I am working now on a new WordPress theme and I want to make a help center system to allow users that will buy my theme do add helper articles.

So my plan is:

1- Make a normal new page and create the page-help.php file.

2- Create two post types first named sections and the second article.

3- Add the sections posts and articles inside the page-help file.

The problem now that I don't need the link of sections and articles be directly like this:


I want to make a rewrite rule to add help beside the section and article post type to be the final link like that:


Really this is very important for me and I hope anyone helps me to make this or at least something like that I want.

Thanks in advance.

  • You can control those values with the slug argument when you register your post types, you don't need to add any additional rewrite rules.
    – Milo
    Aug 13, 2018 at 2:00
  • @Milo Really thank you for your reply please continue with me, Did you mean something like this? rewrite' => array('slug' => 'help')? this will change the name of post type to something else will not like I need.
    – John
    Aug 13, 2018 at 2:05

1 Answer 1


You can achieve this when you register your post types. The slug can be a path:

$section_args = array(
    'rewrite' => array( 'slug' => 'help/section' ),
    // your other args...

$article_args = array(
    'rewrite' => array( 'slug' => 'help/article' ),
    // your other args...
  • Thank you very much I never thought that I can make it like this :)
    – John
    Aug 13, 2018 at 4:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.