WordPress.org

Ready to get started?Download WordPress

Forums

customize widget menu layout (1 post)

  1. infohowdy
    Member
    Posted 1 year ago #

    Hello, I need to customize the code of the widget menu.
    Now when I add a new widget menu in sidebar looks like this

    <ul class="xoxo">
    <li id="nav_menu-2" class="widget-container widget_nav_menu">
    <h3 class="widget-title">Widget Menu</h3>
    <div class="menu-menu-a-container">
    <ul id="menu-menu-a" class="menu">
    <li id="menu-item-4" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-4"><a href="http://localhost/wp-default/?page_id=2">Sample Page</a></li>
    <li id="menu-item-5" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-5"><a href="http://localhost/wp-default/?cat=1">Categories</a></li>
    </ul></div></li>
    </ul>

    I need to change the code like

    <ul class="xoxo">
    <li id="sidebar-navigation" class="widget-container widget_nav_menu">
    <h3 class="widget-title">Widget Menu</h3>
    <div class="menu-menu-a-container">
    <nav>
    <ul id="menu-title" class="menu">
    <li id="sample-page" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-4"><a href="http://localhost/wp-default/?page_id=2" title="Sample Page">Sample Page</a></li>
    <li id="categories" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-5"><a href="http://localhost/wp-default/?cat=1" title="Categories">Categories</a></li>
    </ul>
    </nav></div></li>
    </ul>

Topic Closed

This topic has been closed to new replies.

About this Topic