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: https://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