Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
For Maira. This goes in functions.php of your theme, or possibly in a plugin. If you took out the "theme_location" qualifier, it could affect all menus.
add_filter( 'wp_nav_menu_args', 'dc_modify_nav_menu_args' );
function dc_modify_nav_menu_args( $args )
{
if ( 'primary' == $args['theme_location'] ) {
$args['link_before'] = '<span>';
$args['link_after'] = '</span>';
}
return $args;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.