• Hi!

    I’m creating a site where I have a page called “products”. This page has a custom template where I added the wp_list_categories to list a custom taxonomy called “products” in a SUB navigation. This taxonomy has a few categories and sub-categories such as “Laptops” for example.

    Anyway, when I visit the page products I use the current-page-item, parent and ancestor for example to make the link in the MAIN navigation for that page a bit different.

    However, if I click on a taxonomy item in the SUB navigation. Let’s say I go to “Laptops” and therefor leave the page “prodcuts” I no longer can’t seem to target “prodcts” in the MAIN navigation and therefor not style it accordingly.

    It works just fine with pages and sub-pages. But I must somehow tell wordpress that the taxonomy called #products” is a part of the page called “products”.

    Any ideas?

    I’m doing this locally so no link, but I can post code snippets if you want me to.

    Thank you!

  • The topic ‘Current page when viewing taxonomy?’ is closed to new replies.