I am trying to add static menu item to Wordpress Menu.I am using filter 'wp_nav_menu_items' for this in functions.php. It works but it doesn't put it under menu container tag.
function add_nav_menu_items( $items , $args ) { ?>
<ul>
<li><a href="#">PRODUCTS</a>
<ul>
<li><a href="<?php echo esc_url(get_category_link(get_cat_ID('Sci-Fi')));?>">SCI-FI</a>
<ul>
<?php query_posts( array ('post_type'=>'scifi','showposts'=>-1,'order'=>'ASC') ); while ( have_posts() ) : the_post(); ?>
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php endwhile; wp_reset_query(); ?>
</ul>
</li>
<li><a href="<?php echo esc_url(get_category_link(get_cat_ID('Drama')));?>">Drama</a>
<ul>
<?php query_posts( array ('post_type'=>'drama','showposts'=>-1,'order'=>'ASC') ); while ( have_posts() ) : the_post(); ?>
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php endwhile; wp_reset_query(); ?>
</ul>
</li>
<li><a href="<?php echo esc_url(get_category_link(get_cat_ID('Horror')));?>">HORROR</a>
<ul>
<?php query_posts( array ('post_type'=>'horror','showposts'=>-1,'order'=> 'ASC') ); while ( have_posts() ) : the_post(); ?>
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php endwhile; wp_reset_query(); ?>
</ul>
</li>
</ul>
</li>
</ul>
<?php return $items;}
add_filter( 'wp_nav_menu_items', 'add_nav_menu_items',10,2);
When i put the code online firebug show it like this
<div id="navigation_top">
<div id="navmenu_top">
<ul> **-->> This is my static menu**
<li>
</ul>
<ul id="menu-menu-1" class="menu-container"> **-->> This is WP_nav_menu**
<li class="type menu-item-object-page menu-item-587">
<li class="type menu-item-object-page menu-item-122">
<li class="type menu-item-object-page menu-item-121">
**I want my menu appear here **
</ul>
</div>
</div>
Is there anyway i can do this???
Thanks for any advice...