CustomPress posts not found on front end

I’ve installed and configured CustomPress… and created three custom post types. I’ve created a couple of posts under one of those types, but when I try to view the posts on the front end of the site, I get the “not found” page. I’m guessing I’ve missed a step somewhere, but I’m not sure where.

  • Jude
    • DEV MAN

    Hi there @ward Ashman

    Hope you’re doing great !!

    Did you flush permalinks after you created the CPTs ? Also are you using any custom template to create / view these CPTs on the front end ?

    Please clear all types of cache on the browser and server once you flush permalinks and try again

    wp-bytes.com/function/2013/02/flushing-permalinks/

    Jude

  • Jude
    • DEV MAN

    Hi there @ward Ashman

    Hope you’re doing great !!

    Did you flush permalinks after you created the CPTs ? Also are you using any custom template to create / view these CPTs on the front end ?

    Please clear all types of cache on the browser and server once you flush permalinks and try again

    wp-bytes.com/function/2013/02/flushing-permalinks/

    Jude

  • scottmcculloch
    • The Incredible Code Injector

    Hi @jude,

    I’ve cleared the cache (on two different browsers), and flushed the permalinks.

    I am using a “custom template” sort of… I copied the single.php file from my theme and have commented out parts I don’t want showing on our pages — date, author, category — but “the content” tag is still there.

    Also, it’s not that the page is coming up blank… I’m getting the “not found” message. You can see it here: http://trimergence.staging.wpengine.com/online-learning/self_assessments/three-assets-self-assessment/

    Thanks,

    Scott

  • scottmcculloch
    • The Incredible Code Injector

    Thanks, @jude, I think that’s getting me closer.

    I had the permalinks set to use the built-in “Post name” setting… it works for all my “regular” pages. I changed it to the default, and then the page referenced above did display here:

    http://trimergence.staging.wpengine.com/online-learning/?post_type=self_assessments&p=195

    I then changed it back to “Post name” and when on to check the hierarchical setting for the content type — I did have it set to “hierarchical” — when I changed that to false, then the page displayed.

    So, it does seem to have something to do with the taxonomy hierarchy — I’m not sure what’s wrong though. When I have the content type set to be hierarchical, the page doesn’t display at the “Post name” permalink style url, but I’d rather have it set to being a hierarchical content type. The taxonomy is set to non-hierarchical (i.e., tags type). Even if I remove all tags and categories from the specific content item, the page won’t display using the “Post name” url if the content type is set to hierarchical.

    As for htaccess – there shouldn’t be anything interfering — I’m pretty sure it’s just the basic WP htaccess.

    As far as what the dev suggests in the thread you referenced, I’m not sure how to set that up in the permalinks since I can’t use the % for the variables in the custom links settings (assuming that’s what I need to use).

    Assuming, then, that this has something to do with taxonomy hierarchy, what have I missed? How can I have a content type set to be hierarchical AND use the WP standard “Post name” permalink urls?

    Thanks

    Scott

  • Michelle Shull
    • DEV MAN’s Apprentice

    Hi, Scott!

    Did you name your single.php pages after your new custom post types? For example, your first group should have a php page with a title like so: single-trimergence-assessments.php. The second would be single-learning_materials.php. The third would be single-coach_pages.php. The first is using a custom rewrite slug in the settings, which is why the php page title is a bit different.

    I think that might be the step we’re missing here. I looked in the theme editor for your site’s theme on Network Admin, and I’m not seeing the custom post type single post template listed. That doesn’t mean it’s not there, if you have a lot of theme files, sometimes the editor won’t show them all.

    Thanks!

  • scottmcculloch
    • The Incredible Code Injector

    Hi Michelle,

    I had not created any new single.php pages for the new custom post types (although they show up fine if I have the content type set as not hierarchical, or if I use the default permalinks, so it didn’t occur to me that might be it).

    I’ve now added the single-trimergence-assessments.php, etc (just copies of the single.php renamed)… the pages are still not showing up in the front end with the content type set as hierarchical and the permalink set as “Post name”.

    Note: in the theme, they are under the /styles/Assessments Sites/layouts/ directory.

    Thanks,

    Scott

  • Michelle Shull
    • DEV MAN’s Apprentice

    Hey Scott!

    CoursePress can be kind of a bear to get working, I know we all have stories about when we tried to make it work for the first time, so kudos for continuing to plug along with it.

    Let’s try one simple thing, and change the EP (endpoint mask) settings to the default, which is none. I think that may be interfering with your taxonomy here.

    Thanks! That explains why I couldn’t find them, if they were in a subfolder. The WordPress editor is pretty simple, sub-folders are typically more than it can do.

    Thanks, Scott!

  • scottmcculloch
    • The Incredible Code Injector

    Hi Michelle,

    Okay, so I changed the EP to the default/none for just the first content type for testing (trimergence-assessments), and same result… still getting the “not found page”.

    I’m on my way out… won’t be able to do any more testing until tomorrow.

    Thanks,

    Scott

  • scottmcculloch
    • The Incredible Code Injector

    I think I got it working…

    I don’t recall setting this, but Query var was set to “false” — changed that to “true” and reverted EP back to “permalink” and it seems to be working now.

    It also appears the different content types are all using the single.php layout file, even though I’ve created single-self_assessments.php and so on also. For now that’s okay as we don’t need different output per content type, but it’s possible in the future, so hopefully I can figure this out too. :slight_smile:

    Thanks,

    Scott

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.