[resolved] Custom post type loads home page, not archive page (2 posts)

  1. Nate
    Posted 2 years ago #

    I have a custom post type set up (two, actually) that are not displaying properly. I am hoping that it is the same issue with both post types.

    Here is my code for one of the post types (portfolio). The second is quite similar. http://pastebin.com/KZfNwytX

    Each post type is included in a separate file, and called to functions.php with an include command. These are showing up in the admin area perfectly, posts are being saved perfectly, etc. However, the theme files (archive-portfolio.php and single-portfolio.php) are not loading. Instead, my custom home page is being displayed. Here is a link to the portfolio page:


    And the single post I have created:


    I don't know what the issue would be. I have flushed the rewrite rules with each post type, and removing it does nothing either. I have only recently started with custom post types, so any assistance would be extremely helpful.

  2. Nate
    Posted 2 years ago #

    I have resolved the issue. It turned out that there was nothing wrong with the CPT code, but rather an issue I had earlier that had come back to bite me.

Topic Closed

This topic has been closed to new replies.

About this Topic