Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am a WP beginner and hope if anyone can help me out.

I have recently installed WP 3.3.2 and Jigoshop 1.2 to see how things works if I can use WP as an ecommerce website.

The problem I am facing at the moment is in order to display the products, Jigoshop creates a page in WP, as when you click on the page the link will get redirect from ?page_id=5 to ?post_type=product. As the page being redirected the current_page_item class doesn't stay/appear to show the style for current position in the menu.

The current menu code is <?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>

Many thanks for the help in advance.

share|improve this question

1 Answer 1

Jigoshop are doing it wrong...

Instead of adding a page to the menu, you can add a link, directly to your 'product' archive page.

You could, just add a custom link that points to the archive page, though - this has its drawbacks... notably if the url ever changes you'll have to manually update it and it will also not stay 'current' when you view individual post of that post type.

To get round this I've created this very small plug-in. It adds an extra metabox to your Appearance > Menu page, which lists your (archived) post types. You can use this to add the product archive link to your menu.

share|improve this answer
    
Thanks for the help, I will give it a go! –  dlin May 10 '12 at 8:38
    
+1 (also on the plugin page) Don't know how I could live without it. :) –  kaiser Oct 2 '12 at 0:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.