Support » Plugins » Understandind Custom Post Type Rewrite

  • Resolved leogermani


    I cant find a way to have my rewrite option for a custom post type to work properly. Ive seen dozen of blogs and forum posts talking about this but with no clear resolution.

    What I expect:

    When I register a custom post type withe ‘rewrite’ set to true (which is the default value), I have pretty permalinks for my custom post types.

    eg. If I register a custom post type called ‘book’, my permalink will look like mysite/book/post-slug

    What I get:

    In my Edit screem it looks right, the “view book” links exactly as I expected, but I get a 404 error no matter what..

    I have tried setting my permalink structure in many different ways with no luck.

    Can someone please clarify this? Am I expeting right?


Viewing 2 replies - 1 through 2 (of 2 total)
  • Took this link right out of my test system using the Day and name permalink structure:


    Update your permalinks. Then edit and save the article. Then View Book (or view post). Note: I’m using Function_Reference/register_post_type examples.

    Ive found my problem,

    publicly_queriable must be set to true.

    I found that the documentation was misleading the understanding of the public and publicly_queriable paramater.

    Hi, I have made a change to the documentation of register_post_type function on the codex. the description of publicly_queriable was using ‘front page’ meaning ‘front-end’. Also, Ive made a better explanation of the public argument.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Understandind Custom Post Type Rewrite’ is closed to new replies.