Support » Plugin: Flexible Posts Widget » Custom post types 404 after install

  • Resolved speekless

    (@speekless)


    Hi, after installing your plugin I get a 404 error “No posts to display” when accessing my custom post types, or custom post type archives. Deactivating the plugin doesn’t seem to solve the issue either.

    I use a custom theme based on twentytwelve, where the custom post types and custom post type archives templates are loaded via default WordPress overrides such as archive-xxx.php, and single-xxx.php. Nothing crazy here.

    http://wordpress.org/extend/plugins/flexible-posts-widget/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author DaveE

    (@dpe415)

    Hi speekless,

    I’m sorry to hear you’re having trouble with your custom post types. However I can’t imagine how FPW would cause the issues you describe. I too have many sites using CPT templates as you describe and am also using FPW with those customized themes.

    Do you have a development site somewhere that we could review together? With more details (code example) I may be able to provide some assistance, but I highly doubt they are specifically related to FPW. (Of course, crazier things have happend, so I won’t rule it out.)

    Let me know if you can provide more context and we’ll go from there.

    Cheers!

    Thread Starter speekless

    (@speekless)

    Hey Dave, thanks for the reply and your willingness to help. I can’t rule something else out either, but it was working perfectly seconds before I installed the plugin, and the first thing I checked after install was to click the custom posts that appeared in the widget. I then got a 404. I’ve examined my theme files in detail, but I couldn’t find anything abnormal.

    This is the website: http://www.bizcampus.nl . You’ll see that you get an error for bizcampus.nl/trainers (custom post type archive) and for individual trainers (accessible from “Onze Trainers” page).

    The custom posts are there, and they do show up in your widget (you can see this on “Cursussen” page). On the “Onze Trainers” page, the custom posts load fine too, because this is a custom query built into the page template.

    (NB: There is only one published trainer right now, so that is perfectly normal)

    But on the pages where the default hierarchy should be followed, I get this error. I can see that this specific error message is coming from the index.php file, so it seems to me that somehow, the whole hierarchy is getting skipped.

    This is the “flow” of my theme files:

    – I have one “single-trainers.php” (which contains the actual loop), with a get_template_part( ‘content’, ‘trainers’ )
    – “content-trainers.php” contains the markup for the loop (<article>…</article>)

    I don’t have a separate “archive-trainers.php”, as this is handled by the “Onze Trainers”-page, which uses a custom page template. Nevertheless, bizcampus.nl/trainers should still work by falling back on the default archive page. But the “while ( have_posts() )” is not being triggered, and sending everything back to index.php

    I can grant you access to the site if that could help, is there somewhere i could send you the login info in private?

    Thank you!
    Pim

    Plugin Author DaveE

    (@dpe415)

    Hi Pim,

    Just looking over the site I don’t see anything out of the ordinary. Could you please get me login credentials to the site? Let me know your Twitter handle and I’ll follow you so you can send me a DM with the credentials.

    Cheers,

    Plugin Author DaveE

    (@dpe415)

    BTW – my Twitter handle is dpellenwood.

    Thread Starter speekless

    (@speekless)

    Thanks, I’ve followed you (mine is speekless).

    Plugin Author DaveE

    (@dpe415)

    Hi Pim,

    The problem should be fixed now. All it took was a simple permalinks reset. I’m assuming there was a change in the permalink structure or another plugin made such an adjustment around the same time that FPW was installed. Regardless, your custom post types are showing up in their archive and as single posts now.

    Cheers!

    Thread Starter speekless

    (@speekless)

    Thank you very much for the awesome support!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Custom post types 404 after install’ is closed to new replies.