1

to expand on this question title:

Is there a way to establish a parent/child relationship of menu links (using the WP menu) that adds the dynamic helper classes (ie. current-menu-parent, current-menu-item) based on the configuration of the WP menu instead of the natural page structure?

For example, if I have some custom post type content that my client wants to include into the context of some other standard page content via the WP menu, is it possible to have WP identify the menu parent page as the "current-menu-parent" when viewing this CPT page that is not naturally a descendant of the parent page, only explicitly set as that via the WP menu?

An illustration of the proposed menu structure:

Golf (standard page parent)
-- Tips (standard page child)
-- Course #1 (custom post type)
-- Stats (standard page child)

Could this menu structure work and give me the appropriate dynamic CSS classes when viewing the custom post type page?

Not sure how to explain this more clearly or if this is just total blasphemy in general. I can't find any info. Any help, guidance or reality checks welcome!

Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.