I am trying to add a variable inside wp_nav_menu, I am not sure how to do it, please help me! Here is a snippet of the code:
wp_nav_menu(array(
'menu' => 'Main Menu',
'theme_location' => 'Main Menu',
'container' => null,
'container_class' => '',
'menu_id' => 'header-menu',
'menu_class' => '',
'before' => '<span class="text1">',
'after' => '</span><span class="text2"><a href="">' . the_title($post->ID) . '</a></span>',
));
PLEASE HELP ME!
Have a look at this tutorial. It's quite likely to answer your question and more
Try this this will add URL
If you want it this way url
Is this what you mean? You may have to explain a little further, but this is how you'd add some additional values to
wp_nav_menu
.