WordPress.org

Ready to get started?Download WordPress

Forums

clean up some Code from the WordPress menus (1 post)

  1. daveleeone
    Member
    Posted 3 years ago #

    Hello people I am very new to WordPress and just trying to edit the templates for the menus of WordPress 3. However, I have a problem here.

    How can I clean up some Code from WordPress-Menus?
    Example:

    <ul id="menu-haupnavigation" class="menu">
    <li id="menu-item-38" class="menu-item menu-item-type-post_type current-menu-item page_item page-item-2 current_page_item menu-item-38">
    <a href="http://meineseite.at/eine-seite/">News</a></li>
    <li id="menu-item-37" class="menu-item menu-item-type-post_type menu-item-37"><a href="http://meineseite.at/termine/">Termine</a></li>
    </ul>

    to:

    <li class="active"><a href="http://meineseite.at/eine-seite/">News</a></li>
    <li><a href="http://meineseite.at/termine/">Termine</a></li>

    The only class that I want to use in my example is (in active sites) class = "active".

    In the reference "http://codex.wordpress.org/Function_...ce/wp_nav_menu" I have found, unfortunately, not the right but maybe you can help me.

    My current menu configuration in the template:

    <?php wp_nav_menu( array(
                          'theme_location' => 'first',
                        'container' => '',
                         'depth'     => 0,
                        'container_class' => ''
                        ) ); ?>

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.