Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1151050

    Rad
    Moderator

    Hi there,

    You’ll have to edit the already provided code and find the icon you wish to change and change it. You’ll not going to add new code, just change the value of data-x-icon. Example, let’s just take the portion of the code above.

    .... there are moe codes above
    ..
    ..
    ..
    
     if ( ! X_BUDDYPRESS_IS_ACTIVE || X_BUDDYPRESS_IS_ACTIVE && x_get_option( 'x_buddypress_header_menu_enable' ) == '' ) {
            if ( ! is_user_logged_in() ) {
              $submenu_items .= '<li class="menu-item menu-item-bbpress-navigation"><a href="' . wp_login_url() . '" class="cf"><i class="x-icon-sign-in" data-x-icon="" aria-hidden="true"></i> <span>' . __( 'Log in', '__x__' ) . '</span></a></li>';
            } else {
              $submenu_items .= '<li class="menu-item menu-item-bbpress-navigation"><a href="' . bbp_get_user_profile_url( get_current_user_id() ) . '" class="cf"><i class="x-icon-cog" data-x-icon="" aria-hidden="true"></i> <span>' . __( 'Profile', '__x__' ) . '</span></a></li>';
            }
          }
    
    ..
    ..
    ..
    .... there are moe codes below

    Then you decide to change the icon on that submenu, hence, you’ll going to find this and change the value of data-x-icon

    <i class="x-icon-cog" data-x-icon="" aria-hidden="true"></i>

    It will become like this,

    .... there are moe codes above
    ..
    ..
    ..
    
     if ( ! X_BUDDYPRESS_IS_ACTIVE || X_BUDDYPRESS_IS_ACTIVE && x_get_option( 'x_buddypress_header_menu_enable' ) == '' ) {
            if ( ! is_user_logged_in() ) {
              $submenu_items .= '<li class="menu-item menu-item-bbpress-navigation"><a href="' . wp_login_url() . '" class="cf"><i class="x-icon-sign-in" data-x-icon="" aria-hidden="true"></i> <span>' . __( 'Log in', '__x__' ) . '</span></a></li>';
            } else {
              $submenu_items .= '<li class="menu-item menu-item-bbpress-navigation"><a href="' . bbp_get_user_profile_url( get_current_user_id() ) . '" class="cf"><i class="x-icon-cog" data-x-icon="&#xf004;" aria-hidden="true"></i> <span>' . __( 'Profile', '__x__' ) . '</span></a></li>';
            }
          }
    
    ..
    ..
    ..
    .... there are moe codes below

    Now, what you wish to change and what change you wish to apply depends on you. It’s just a general procedure so you could replace any icon from that whole code.

    Thanks!