WordPress.org

Forums

Custom Post Type UI
[resolved] archive-post-type-name not working (4 posts)

  1. markyeoj
    Member
    Posted 2 years ago #

    Hi I registered a custom post type using Custom Post Type UI, and created an archive page and named it archive-recipe.php, 'recipe' is my custom post type name. But its now working, instead its using the default archive.php. and set the 'has-archive' to 'true' but still not working. How to fix that?

    http://wordpress.org/extend/plugins/custom-post-type-ui/

  2. Michael Beckwith
    Member
    Plugin Author

    Posted 2 years ago #

    Even though I believe the plugin tries do this already anyway, could you try refreshing the permalink rules by visiting the permalinks settings page?

    Also *just* in case, do we have any posts yet?

  3. markyeoj
    Member
    Posted 2 years ago #

    Thanks, I finally figured out the problem, on the registration code..
    I saw this

    'rewrite' => array('slug' => ''),
    so I replaced that with
    'rewrite' => array('slug' => 'recipe'),

    And I thought the archive-{post-type.php} will display the list of post from a particular taxonomy, with a little research, I found out that it will only display the list of post from my custom post type, so what I did, I created a taxonomy-{taxonomy-name.php} to display the list of post of a particular taxonomy and I also created single-{post-type.php} to display single post of my custom post type.

    And that's it.. now its working :)

  4. Michael Beckwith
    Member
    Plugin Author

    Posted 2 years ago #

    Good to hear. That rewrite stuff should be getting fixed in 0.8 which I'm hoping to have ready and released this weekend or early monday.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Custom Post Type UI
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic