Is that possible to insert a text before the menu items? In this case, I want to lead a <h3>
tag for the list content (like a menu title). I tried the if/else
to recognize that the menu have content and show the title. But if the menu have no content, so it should not have to display the title.
Here it is:
$args = array(
'menu' => 'Destination • South America',
'echo' => false,
'fallback_cb' => '__return_false'
);
if (empty($args)) {
echo "<li></li>";
}else{
echo "<h3>South America</h3>";
}
echo strip_tags(wp_nav_menu( $args ), '<li><a>');
Because I have content, so It should output:
South America
Argentina
Brazil
Chile
Colombia
Equador
Uruguay
Venezuela
If I would not have any content, so it should not display the South America
Thank you!
h3
) should not be display! – user3301994 Jul 7 '14 at 17:03