1

Is there a way I can display a menu in my theme that isn't formatted in a list? i just want to display the <a> tags without the <li> tags.

is this possible?

theme file:

<?php wp_nav_menu( array( 'theme_location' => 'navigation' ) ); ?>

functions.php:

function register_my_menus() {
    register_nav_menus(array('navigation' => __( 'Main Nav' )));
}

add_action( 'init', 'register_my_menus' );

Edit: see my answer below, found on Stack Overflow

1

1 Answer 1

1

It looks like what i'll need to do is look at a customized menu walker, as suggested at this thread over on Stack Overflow:

https://stackoverflow.com/questions/9003918/editting-wp-nav-menu-so-it-prints-divs-instead-of-lis

From there, looking at suggestions I found:

http://www.mattvarone.com/wordpress/cleaner-output-for-wp_nav_menu/

That's solved this perfectly!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.