Support » Themes and Templates » Custom post type loads home page, not archive page

  • Resolved Nate Hawkes


    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.

    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.

Viewing 1 replies (of 1 total)
  • Nate Hawkes


    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.

Viewing 1 replies (of 1 total)
  • The topic ‘Custom post type loads home page, not archive page’ is closed to new replies.