I'm trying to make a social links menu for the footer in my theme. I want a menu to be customisable in Dashboard, I want the links to be relative to what's put in there.
Originally to get that, I did this:
<a href="http://www.facebook.com/" target="_blank"><i class="fa fa-facebook circle"></i></a>
<a href="http://www.google.com/" target="_blank"><i class="fa fa-google-plus circle"></i></a>
<a href="http://www.twitter.com/" target="_blank"><i class="fa fa-twitter circle"></i></a>
<a href="http://www.linkedin.com/" target="_blank"><i class="fa fa-linkedin circle"></i></a>
For hard-coded menu items.
Now, I want to use
<?php wp_nav_menu( array( 'theme_location' => 'social' ) ); ?>
To generate the <li>
but realise that doing so puts the link label, i.e. Facebook
inside the <li><a>
tags.
i.e. <li class="fa fa-facebook circle"><a href="fb.com">Facebook</a></li>
Which isn't that great because 1. Facebook label gets in the way and 2. is the only thing that is clickable.
I want to get the link tag on the outside of my classes (being set automatically by Wordpress too through Menu customisation)
I realise I could write the <i>
class inside the label for each menu item, but that defeats the purpose I'm going after here.
Edit: I'd love a solution that doesn't exclude hacking in some way.