Web Hosting
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Non-plain permalink settings break my template hierarchy for custom post types

Discussion in 'Themes and Templates' started by josephrajewski, Oct 20, 2016.

  1. josephrajewski

    New Member

    Joined:
    Oct 20, 2016
    Messages:
    1
    Likes Received:
    0
    So I’ve run across a problem & I can’t seem to figure out why everything works when using the “plain” permalink structure & not any of the others (preferably post name).

    So I’ve created 4 custom post types (apples, oranges, kiwi, bacon) & used the naming structure from the codex (see Wordpress codex for template hierarchy). however when I copy single.php, archive.php & category.php to create the templates for each of those custom post types… I get a 404 error when I try & visit them.

    example:
    archive.php is replicated as archive-apples.php , then I try & view {someurl}/apples/2016/10 I get a 404 error. And so on for the category.php & single.php replicated for all 4 custom post types.

    What’s really strange is that If I switch back to the “plain” permalink structure, I get the desired result (I see the correct template).

    I’ve tried switching back & forth to reset things, with no success.
    Any idea where this bug comes from or ideas how to fix/troubleshoot?
     
    #1

Share This Page

Web Hosting