add a span to the main menu links in the twentyeleven theme
-
Hi,
I’m simply trying to add a span to the main nav links in the twentyeleven theme. This is just so i can add an icon for the home page link and leave the rest as text links.
in the header.php page of the TWENTYTEN THEME the wp_nav_menu parameters are as below(the span is already there for the a link);
<?php wp_nav_menu( array( ‘container_class’ => ‘menu-header’, ‘theme_location’ => ‘primary’, ‘link_before’ => ‘<span>’, ‘link_after’ => ‘</span>’ ) ); ?>
….But in the TWENTYELEVEN THEME they are different and there is no span.
<?php wp_nav_menu( array( ‘theme_location’ => ‘primary’ ) ); ?>
to add a span should it be the same as the twentyten theme or is that too much code? and it should be something like this?
<?php wp_nav_menu( array( ‘theme_location’ => ‘primary’, ‘link_before’ => ‘<span>’, ‘link_after’ => ‘</span>’ ) ); ?>
once I have the span in place i can via css style and hide whatever elements I need to, its just getting the span in there without any other knock on effects site wide.
Any help with this appreciated.
thanks?
p
- The topic ‘add a span to the main menu links in the twentyeleven theme’ is closed to new replies.