Support » Plugins » Hacks » has_archive for default "post" post type

  • Resolved tysonarmstrong



    I’ve created a bunch of custom post types which each have the “has_archive” key set in the register_post_type function array. This works fine.

    I have a different front-page, and want to essentially have \blog\ which will be an index of the default (but renamed) “post” post-type.

    I have put this in my function.php, and echoed the $wp_post_type variable and I can see the change has occurred, however it still has not enabled an archive page as desired.

    function add_blog_archive_page() {
    global $wp_post_types;
    $wp_post_types['post']->has_archive = 'blog';
    add_action( 'init', 'add_blog_archive_page' );

    Is anyone aware of what I need to do to get this working?


Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘has_archive for default "post" post type’ is closed to new replies.