[英]WooCommerce: Custom my account endpoint & permalinks
I've got a custom my account endpoint created using this method: https://woocommerce.wordpress.com/2016/04/21/tabbed-my-account-pages-in-2-6/ 我有一个使用此方法创建的自定义帐户端点: https : //woocommerce.wordpress.com/2016/04/21/tabbed-my-account-pages-in-2-6/
My custom endpoint and my account tab is 'support-tickets'. 我的自定义端点和“帐户”标签为“支持票”。
Inside of that new tab, I've got a pagination function that shows links as /my-account/support-tickets/?page=2
, but when clicking on the links returns the base /my-account/2
URL and just shows my main Dashboard tab. 在该新标签内,我有一个分页功能,将链接显示为
/my-account/support-tickets/?page=2
,但是单击链接时会返回基本的/my-account/2
URL并仅显示我的主仪表板选项卡。
I've tried adjusting the add_query_vars
function like so: 我试过像这样调整
add_query_vars
函数:
public function add_query_vars( $vars ) {
$vars[] = self::$endpoint;
$vars[] = 'page';
return $vars;
}
But this doesn't work. 但这是行不通的。 Any thoughts or ideas?
有什么想法或想法吗? Is this possible to have pagination work within the custom endpoint?
是否可以在自定义端点中进行分页工作?
添加新的自定义终结点时,请确保在wp-admin设置区域中保存了永久链接(使用/%postname%/选项)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.