Support » Fixing WordPress » Prevent "$after" character from appearing after last menu item
5 years, 10 months ago
I’m using the following code in the footer menu on my website:
<div class="footerNav"> <?php wp_nav_menu( array( 'container_class' => 'footer-menu', 'theme_location' => 'footer', 'after' => ' | ' ) ); ?></div>
Notice I’m using a pipe ‘ | ‘ character for the after option.
My last item in the menu shows up as ‘Contact Us | ‘
Is there a way to prevent the ‘after’ option from showing up after the last menu item?