Forums

Customizing wp_nav_menu in Starkers Theme (3 posts)

  1. ZaLiTH
    Member
    Posted 9 months ago #

    Hi all,

    I'm battling to find something here.. It's probably right under my nose and I wouldn't be surprised if I've already gone past it 20 times. Anyway, I'll skip the long descriptions because I suspect this is something really simple.

    First off, I'm assuming the menu is built through the default WP functions, so is there any way I can edit the structure of the output for my theme alone?

    Currently, the theme has this:

    <div role="navigation"><br />
    	<?php /* Our navigation menu.  If one isn't filled out, wp_nav_menu falls back to wp_page_menu.  The menu assiged to the primary position is the one used.  If none is assigned, the menu with the lowest ID is used.  */ ?><br />
    	<?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?><br />
    </div><!-- #mainnav -->

    And it outputs:

    <div role="navigation"><br />
    	<div class="menu">
    		<ul>
    			<li class="current_page_item"><a href="http://127.0.0.1:8080/Amity/" title="Home">Home</a><br />
    			<li class="page_item page-item-8"><a href="http://127.0.0.1:8080/Amity/?page_id=8" title="About Us">About Us</a><br />
    			<li class="page_item page-item-2"><a href="http://127.0.0.1:8080/Amity/?page_id=2" title="Sample Page">Sample Page</a>
    		</ul>
    	</div><br />
    </div><!-- #mainnav -->

    And I want the output to be:

    <div role="navigation">
    	<ul id="mainnav" class="dropdown">
    		<li class="current_page_item"><a href="http://127.0.0.1:8080/Amity/" title="Home">Home</a><br />
    		<li class="page_item page-item-8"><a href="http://127.0.0.1:8080/Amity/?page_id=8" title="About Us">About Us</a><br />
    		<li class="page_item page-item-2"><a href="http://127.0.0.1:8080/Amity/?page_id=2" title="Sample Page">Sample Page</a>
    	</ul>
    </div><!-- #mainnav -->

    Problem is, I can't find where the DIV with class 'menu' is being added to take it out or edit it.. Could someone help me out here?

  2. ZaLiTH
    Member
    Posted 9 months ago #

    Heh.. Seems something went a bit funky with my code blocks there, you should still be able to understand what I'm trying to do though.

    Edit: Fixed first post.

  3. ZaLiTH
    Member
    Posted 9 months ago #

    Does nobody know where I can change the layout of this menu....? It's messing with my navigation layout, I really need to get rid of the extra div.

Reply

You must log in to post.

About this Topic