Results 1 to 4 of 4

Thread: Alt and Title in WP menu items not reflecting on the front-end

  1. #1
    Thread Starter
    Veteran Fanatic's Avatar
    Join Date
    Jul 2010
    Location
    Canada
    Posts
    885
    Thanks
    309
    Thanked 57 Times in 51 Posts

    Alt and Title in WP menu items not reflecting on the front-end

    The Alt/Title is not picking up the Title Attribute text inserted in the WP Menu item, it's only reflecting the Navigation Label

    Example:
    Navigation Label
    Home

    Title Attribute
    This is the home button

    On the front-end, the title attribute is dismissed and we only see "Home" as a title attribute

    I narrowed it down to the wp_bootstrap_navwalker file, it seems this is the code used to get the Title/Alt info from the WP menu but yet it does not show the proper Title/Alt that is assigned in the native WP menu item

    if ( ! empty( $item->attr_title ) )
    $item_output .= '<a'. $attributes .'><i class=" ' . esc_attr( $item->attr_title ) . '"></i>&nbsp;';
    else
    $item_output .= '<a'. $attributes .'>';

    $item_output .= $args->link_before . apply_filters( 'the_title', $item->title, $item->ID ) . $args->link_after;
    $item_output .= ( $args->has_children && 0 === $depth ) ? ' <span class="caret"></span></a>' : '</a>';
    $item_output .= $args->after;

    $output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args );
    }
    }
    What needs to be changed/added to allow the Alt/Title of the menu item to reflect on the front-end?

  2. #2
    Moderator ovidiubica's Avatar
    Join Date
    Mar 2011
    Posts
    5,749
    Thanks
    240
    Thanked 1,062 Times in 1,000 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  3. #3
    Thread Starter
    Veteran Fanatic's Avatar
    Join Date
    Jul 2010
    Location
    Canada
    Posts
    885
    Thanks
    309
    Thanked 57 Times in 51 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  4. #4
    Expired Customer promorocreative's Avatar
    Join Date
    Aug 2016
    Posts
    22
    Thanks
    6
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Custom Menu to replace User Menu Items
    By dutchman in forum Help Using Vantage
    Replies: 1
    Last Post: September 4th, 2020, 11:08 AM
  2. Add extra menu items to the user account menu
    By richfinch in forum Help Using Vantage
    Replies: 6
    Last Post: November 17th, 2018, 10:16 AM
  3. CSS question for menu items
    By olponom in forum Freelancerr
    Replies: 3
    Last Post: January 22nd, 2015, 06:54 PM
  4. why menu title not display full title post
    By fauziahmad in forum Help Using ClassiPress
    Replies: 8
    Last Post: December 30th, 2012, 12:34 AM