Removing UL list and format Menu Shortcode just like normal WP menu

Question

The code I’m using works fine for displaying the menu of choice, but the output is a bullet list instead of a normal WP menu, does anyone know how to make that happen?

Example:

One

Two

Three

Should be:
One Two Three

add_shortcode('menu', 'menu_shortcode');
function menu_shortcode($atts, $content = null) {
extract(shortcode_atts(array( 'name' => null, 'class' => null ), $atts));
return wp_nav_menu( array( 'menu' => $name, 'menu_class' => 'menu-shortcode', 'echo' => false ) );
}
0
Oscar Smith 1 year 2020-07-17T12:10:24-05:00 0 Answers 42 views 0

Leave an answer

Browse
Browse