Within my page template I am displaying a custom menu of all posts of a specific post type (these are “management team members” and can be edited by client).
This means I’ve got The Loop running twice: 1) once in a sidebar to generate the list of items of my custom post type and 2) again in the main content area to display the selected page.
Is there a way to match up the page ID of the URL that is being displayed with the items in my sidebar menu in order to set a “current-menu-item” class, without having to set them manually (since as I said these items can change, so page IDs won’t remain constant)?
OR am I sorely mistaken trying to run the loop twice in this circumstance…?
Cheers.
The topic ‘Current Item with multiple post types’ is closed to new replies.