Remove LI Elements From Output of wp_nav_menu

language: PHP
license: Other

Code for Snippet:

                
<?php    
    $defaults = array(
    'theme_location'  => 'my-menu',
    'container'       => 'nav', 
    'container_class' => 'menu', 
    'echo'            => false,
    'fallback_cb'     => false,
    'items_wrap'      => '%3$s',
    'depth'           => 0
    );
    echo strip_tags(wp_nav_menu( $defaults ), '<nav><a>');
?>
comments powered by Disqus

Info

Source Site:

http://www.codecollector.net/view/4BE0A38F-1184-4872-BE9B-14D2531B20BC-519-000002B68D5B935F

Tags: Wordpress

Link to this snippet:


Download to Code Collector

To use the direct link to your snippet on CodeCollector.net either copy the html from the above section or drag the Download to Code Collector to where you would like to use it.

More Info:

Times Viewed: 274
Date Added: 2015-10-12 10:11:31
Last Modified: 2015-10-12 04:21:28

Web Analytics