WordPress.org

Support

Support » How-To and Troubleshooting » register_post_type() what does the rewrite['pages'] argument do???

register_post_type() what does the rewrite['pages'] argument do???

  • In register_post_type() you can pass an array to rewrite for example

    array( 'slug' => 'whatever', 'pages' => false );

    It doesn’t tell you in the docs or in the core comments what the pages argument actually does?

Viewing 1 replies (of 1 total)
  • Tim Smith
    Member

    @creativeinfusion

    I wondered about this too, and looking at the WP code it looks like it is for pagination on index/archive pages.

    So if you register the custom post type using has_archive = > true then the rewrite argument 'pages' => false means that pagination will not be applied to the index page for that post type e.g. domain/whatever/

Viewing 1 replies (of 1 total)
  • The topic ‘register_post_type() what does the rewrite['pages'] argument do???’ is closed to new replies.