Problem with active menu-item
-
I’m developing my own theme for a WP CMS site. The theme contains a template called products. The WP also has a page called products which use the products-template. This template is mostly like the category archeive, since it displays the posts from a category called products too.
I’m displaying my menu this way:
<?php wp_list_pages('sort_column=menu_order&title_li='); ?>
My permalinks is this custom structure: /%category%/%postname%. When pressing the products menu-item, I get to the following page: /products. When I visit this page, the products menu-item has the class current_page_item (I have styled this into another color then the other menu-items). When clicking on of the products posts, I get to the following page: /products/my-product.
When I visit the posts (eg. my-product), the product menu-item does no longer have the current_page_item class.
Is there a way to handle this?
- The topic ‘Problem with active menu-item’ is closed to new replies.