WordPress.org

Ready to get started?Download WordPress

Forums

Prevent "$after" character from appearing after last menu item (2 posts)

  1. foochuck
    Member
    Posted 2 years 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?

    Thanks!

  2. foochuck
    Member
    Posted 2 years ago #

    *bump*

Topic Closed

This topic has been closed to new replies.

About this Topic