admin管理员组文章数量:1122832
Can this function...
function custom_pagination_base() {
global $wp_rewrite;
$wp_rewrite->pagination_base = 'p';
$wp_rewrite->flush_rules();
}
add_action( 'init', 'custom_pagination_base' );
...be somehow used to change the from of the url from "page/2/" not to "p/2/" but to "?p=2"?
Can this function...
function custom_pagination_base() {
global $wp_rewrite;
$wp_rewrite->pagination_base = 'p';
$wp_rewrite->flush_rules();
}
add_action( 'init', 'custom_pagination_base' );
...be somehow used to change the from of the url from "page/2/" not to "p/2/" but to "?p=2"?
Share Improve this question edited Jul 12, 2016 at 6:21 Pieter Goosen 55.4k23 gold badges115 silver badges209 bronze badges asked Apr 25, 2013 at 12:44 user23068user230681 Answer
Reset to default 0I am not entirely sure what you are asking but that ?p=
pattern is a raw query string. That is, that is what you get without pretty permalinks at all.
Go to Settings->Permalinks in wp-admin and select the default permalinks. Save and you are done. You don't need any other function. If that doesn't solve it you need to rewrite your question so that it is more clear.
本文标签: permalinksHow to change pagination base from slash to query form
版权声明:本文标题:permalinks - How to change pagination base from slash to query form? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736284442a1927250.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论