So I'm pretty new to WP, and while I have some experience with the WP navbar, this is rather unique. I'm trying to inject font awesome icons within the nav that wp generates.
Basically, when I create the menu in wp with: <?php wp_nav_menu( array( 'theme_location' => 'header-menu' ) ); ?>
WP will generate for me:
<div class="menu-main-menu-container">
<ul id="menu-main-menu" class="menu">
<li id="menu-item-15" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-home current-menu-item page_item page-item-7 current_page_item menu-item-15">
<a href="localhost_link/frontpage" aria-current="page">Home</a>
</li>
<li id="menu-item-14" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-14">
<a href="localhost_link/blog/">Listen</a>
</li>
</ul>
</div>
Is there a way to use ACF, or something in wp_admin or elsewhere to be able to replace the link text (specifically "home" and "listen" in above example) with 2 different font awesome icons?
Like this:
<li id="menu-item-15" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-home current-menu-item page_item page-item-7 current_page_item menu-item-15">
<a href="localhost_link/frontpage" aria-current="page"><i class="fas fa-play-circle"></i></a>
</li>
<li id="menu-item-14" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-14">
<a href="localhost_link/blog/"><i class="fas fa-play-circle"></i></a>
</li>
As a note: I cannot (unless someone has a better way) use the fas fa-play-circle classes per link (like in the wp_admin menu editor), as that places it on the anchor, which would be fine, except I'm already using :before's on the anchor element and 2 styled :before pseudo's don't play nice together.
Also, I want the functionality (color, hover, etc) of an icon, so using css background is out as well.
Not even sure if this is possible, but I hope so! Thanks in advance!