I have created a custom post type called Products, on the product pages i have a menu in the left sidebar. This menu is made up of categories for the products.
Is it possible to have my products automatically added to the category menu based the category of the product?
For example, i make a product, i give it a category of blue. Where blue appears in the menu the product will automatically be added underneath blue.
Is this possible?
Thanks
Update: To be more clear i'm using a plugin called Jquery Accordion Menu and the menu uses a widget. It still uses the built-in wordpress menu system. The Jquery Accordion Widget effectively just styles the menu, in the widget settings you pick what menu you want it to show.
I've found this code inside the plugin file after the comments below. I don't know if it's any help.
function widget($args, $instance) {
extract( $args );
// Get menu
if(! isset($instance['speed']) ){ $instance['speed'] = 'slow'; }
$widget_options = wp_parse_args( $instance, $this->defaults );
extract( $widget_options, EXTR_SKIP );
$nav_menu = wp_get_nav_menu_object( $instance['nav_menu'] );
if (!$nav_menu)
return;
$instance['title'] = apply_filters('widget_title', $instance['title'], $instance, $this->id_base);
$classMenu = ($instance['classMenu'] != '') ? $instance['classMenu'] : 'menu';
echo $args['before_widget'];
if ( !empty($instance['title']) )
echo $args['before_title'] . $instance['title'] . $args['after_title'];
?>
<div class="dcjq-accordion" id="<?php echo $this->id.'-item'; ?>">
<?php
wp_nav_menu(
array(
'fallback_cb' => '',
'menu' => $nav_menu,
'container' => false,
'menu_class' => $classMenu
)
);
?>
</div>
<?php
echo $args['after_widget'];
}
EDIT 2: If i can get this working without the plugin then that's great. I just need some sort of menu that displays categories and the pages for that category automatically.