My guess is that the before parameter is passed through a strip_tags function. So it can only be used for plain text – not markup.
I already tried adding a plain text but it doesnt work either.
maybe something with functions.php?
register_nav_menus( array(
'primary' => __( 'Main Navigation', 'shita' ),
) );
Try, ‘link_before’ and ‘link_after’
<?php wp_nav_menu(
array(
'container_class' => 'navi',
'menu_class' => 'navi',
'link_before' => '<img src="style/images/tree.png" alt="sds" />',
'theme_location' => 'primary'
)
);
?>
Another could be to style the title in the style.css, and add the element in the menu call:
'title_li' => '<div class="title-left"></div><div class="title-right"></div>',
Just read your post again and seen you already tried ‘link_before’, eyes are just quicker than the brain!
HTH
David
well, i decided to use the link_before.
thanks a lot for your help!
This issue shouldn’t be closed. Both the before and after attributes seem to be broken for wp_nav_menu. Please either fix the attributes or change the documentation since it’s confusing to users not familiar with WP3.
Thanks!
The same here. Before / After does not work with wp_nav_menu.