WordPress.org

Ready to get started?Download WordPress

Forums

[Creating my theme] Menú and sub menú customization (1 post)

  1. orochirob
    Member
    Posted 2 months ago #

    Hey Hi, I'm Robbie from Santo Domingo, Im very interested working in WP, I have worked now but not my own designs, now im trying to expand my horizons and I think I have many posibilities here, so...

    I already know how to add menu, but not how to customize the sub items of the menu, This is the HTML that i got:

    <div class="primarySiteLinks">
    	<ul class="CMSListMenuUL" id="primarySiteLinks">
    		<li class="onlyTall" style=""><a href="#" class="CMSListMenuLinkHighlighted" style="" >Home</a></li>
    
    		<li class="menuParent" style=""><a href="#" class="CMSListMenuLink" style="" >Menu</a>
    		<ul class="CMSListMenuUL">
    			<li class="CMSListMenuLI" style=""><a href="#" class="CMSListMenuLink" style="" >Doughnuts</a></li>
    			<li class="CMSListMenuLI" style=""><a href="#" class="CMSListMenuLink" style="" >Coffees</a></li>
    			<li class="CMSListMenuLI" style=""><a href="#" class="CMSListMenuLink" style="" >Drinks</a></li>
    			<li class="CMSListMenuLI" style=""><a href="#" class="CMSListMenuLink" style="" >Kool Kreme</a></li>
    		</ul>
    		</li>
    		<li class="menuParent" style=""><a href="#" class="CMSListMenuLink" style="" >Locate</a>
    		<ul class="CMSListMenuUL">
    			<li class="CMSListMenuLI" style=""><a href="#" class="CMSListMenuLink" style="">Location Search</a></li>
    		</ul>
    		</li>

    The displaying menú function that i have is:

    <?php
    							if ( has_nav_menu( 'primary-menu' ) ) { /* if menu location 'primary-menu' exists then use custom menu */
         							 wp_nav_menu( array( 'theme_location' => 'primary-menu', 'container_class' => 'primarySiteLinks') );
    							}
    						?>

    Of course this displays my menu, but not with the classes and the ID's that I need them to work as i want.

    Please, can you tell me What's the next step to customize the ID's and Classes of the sub-menus??
    I'll be very thankfull.

Reply

You must log in to post.

About this Topic