Site logo

Archived topic

Widget - Archives (Custom Post Type) - How to get date archives working?

3 replies · Started by William on February 5, 2021

Viewing posts 1–4 of 4

Added a CPT "Press"
Created archive-press.php (working)

Need to view archives for this CPT by date

Client wants a widget showing archives grouped by year, I tried using Archives (Custom Post Type), it creates links like "/press/2017/06/". When I click on those, they go to the homepage.

I tried using the plugin "Custom Post Type Date Archives", and I get a similar result.

How would I get those links to go to a page that showing those results?

Better yet would be to have the post results on the archive-press.php reflect the filtered date range.

Any and all help is greatly appreciated!

Hi there,

This may be something you need to bring up with the plugin author, as the theme has no say in this kind of stuff.

If the URLs are wrong/not working, your permalinks (Settings > Permalinks) may be broken/configured incorrectly.

FWIW, I found the issue. Rank Math SEO plugin has this setting DISABLED by default.

Dashboard / SEO Titles & Meta

Date Archives

Enable or disable the date archive (_e.g: domain.com/2019/06/_). If this option is disabled, the date archives will be redirected to the homepage.

Glad you found the issue! Thanks for reporting back :)

This archived topic is closed to new replies.