最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How can I change "page" (as in foobar.compage5) to another word?

programmeradmin3浏览0评论

I would like the URLs for "pages" on my blog (which is to say the collections of titles and excerpts fpr 10 entries) to be called something else, such as "groups", so that the URL for the page for the 10 most recent entries would be www.[foobar]/group/1, and so on. How can this be achieved?

I would like the URLs for "pages" on my blog (which is to say the collections of titles and excerpts fpr 10 entries) to be called something else, such as "groups", so that the URL for the page for the 10 most recent entries would be www.[foobar]/group/1, and so on. How can this be achieved?

Share Improve this question asked Apr 20, 2020 at 22:13 user186519user186519 1
  • Make the title of your blog page Groups and the permalink slug for it groups. – Tony Djukic Commented Apr 21, 2020 at 13:26
Add a comment  | 

1 Answer 1

Reset to default 0

Try this:

function re_write_rules() {
    global $wp_rewrite;

    $wp_rewrite->pagination_base    = 'group';
    $wp_rewrite->flush_rules();
}
add_action('init', 're_write_rules');
发布评论

评论列表(0)

  1. 暂无评论