Is there a way (besides adding a Custom Link) to add a custom post type archive to a menu in WordPress? If it’s added using a custom link (e.g. /cpt-archive-slug/), WordPress does not apply classes like current-menu-item to the list element, which presents challenges when styling the menu.

If the custom link contains the entire URL (e.g. http://site.com/cpt-archive-slug/), those classes are added. However, that’s probably not a ‘best practice’.

8 s
8

your best opption is custom link with full url as Custom post types archives are different form taxonomy based archives (categories,tags,any custom taxonomy) and date based archives which have there own archive slug.

Leave a Reply

Your email address will not be published. Required fields are marked *