WordPress.org

Ready to get started?Download WordPress

Forums

Clean Menu (2 posts)

  1. Ladsrack
    Member
    Posted 2 years ago #

    Im having trouble getting wordpress to produce a clean HTML menu, i keep getting the following format

    <ul id="menu-main-menu" class=""><li id="menu-item-20" class="menu-item menu-item-type-post_type menu-item-object-page current-menu-item page_item page-item-18 current_page_item menu-item-20"><a title="Mens Designer Underwear | Ladsrack.com" href="http://localhost/ladsrack/">Home</a></li>
    <li id="menu-item-14" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-14"><a title="Designer Underwear" href="http://localhost/ladsrack/underwear/">Underwear</a>
    <ul class="sub-menu">
    	<li id="menu-item-39" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-39"><a title="Designer Briefs" href="http://localhost/ladsrack/underwear/briefs/">Mens Briefs</a></li>
    	<li id="menu-item-15" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-15"><a href="http://localhost/ladsrack/underwear/your-account/">Your Account</a></li>
    	<li id="menu-item-16" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-16"><a href="http://localhost/ladsrack/underwear/transaction-results/">Transaction Results</a></li>
    	<li id="menu-item-17" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-17"><a href="http://localhost/ladsrack/underwear/checkout/">Checkout</a></li>
    </ul>
    </li>
    <li id="menu-item-135" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-135"><a title="Get In Touch With Us" href="http://localhost/ladsrack/contact-us/">Contact Us</a></li>
    </ul>

    Is it possible just to produce

    <ul>
    <li>menu</li>
    <li>menu</li>
    </ul>

    without all the class and ID attatched?

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    No - not if you are using a custom menu? There's nothing wrong with the generated classes & ids, so if you don't need them, just ignore them.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags