Archive for CPT refuses to show posts
-
I have created a simple CPT “listings” as part of Contact Directory. has_archive is set to TRUE and custom archive URL is set to “directory”. there’s a template archive-listings.php that show a list of these posts. right now I made the posts publicly queryable for testing purposes and you can see that one can see a single listing at https://www.cityofpasadena.net/public-health/listing/tuberculosis-clinic/ (you will only see the title as the rest of the post are ACF custom fields).
However, when one attempts to see the archive of these posts https://www.cityofpasadena.net/public-health/directory, it redirects to the home page. It’s refusing to pick up the archive template with the set “directory” rewrite. however, you can still see the archive using query parameters, https://www.cityofpasadena.net/public-health/?post_type=listings
Why is archive rewrite not working? Also, originally I had publicly-queryable set to false, so that one couldn’t see sinlge post item, but only archive and it worked fine. This stopped working overnight with no changes to CPT settings. can you point me to what I am not considering.The page I need help with: [log in to see the link]
- The topic ‘Archive for CPT refuses to show posts’ is closed to new replies.