WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. EFAREM
    Member
    Posted 3 years ago #

    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?

  2. itinerant
    Member
    Posted 3 years ago #

    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/

Topic Closed

This topic has been closed to new replies.

About this Topic