Home Forums Basel support forum How to change the name and color of the label "SALE NEW HOT" on the menu?

How to change the name and color of the label "SALE NEW HOT" on the menu?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #3781

    pintostattoo
    Participant

    Hi.

    In which file? I can change the labels NEW HOT OUT to create a new or modify an existing thanks.

    Label

    #3783

    Artem Temos
    Keymaster

    Hello,

    Thank you very much for purchasing our theme and contacting our support center.

    The file that contains all labels options is basel/inc/third-party/nav-menu-images/inc/walker.php. Find the following code and add your own labels

    
    <option value="hot" <?php selected( $label, 'hot', true); ?>><?php _e('Hot', 'basel'); ?></option>
    <option value="sale" <?php selected( $label, 'sale', true); ?>><?php _e('Sale', 'basel'); ?></option>
    <option value="new" <?php selected( $label, 'new', true); ?>><?php _e('New', 'basel'); ?></option>

    Regards
    XTemos

    #3812

    pintostattoo
    Participant

    Thank to reply so soon. I could add a label more call soon, but does not work correctly, any ideas?

    The name of the label is empty

    HTML code of the menu

    #3818

    Artem Temos
    Keymaster

    Sorry, you also need to add a text for your new label in the file inc/functions.php. Find the following code and add your new label

    switch ( $label ) {
    	case 'hot':
    		$label_text = esc_html__('Hot', 'basel');
    	break;
    	case 'sale':
    		$label_text = esc_html__('Sale', 'basel');
    	break;
    	case 'new':
    		$label_text = esc_html__('New', 'basel');
    	break;
    }

    Regards

    #15803

    vanuch
    Participant

    How to do the same thing (change label names) without editing the theme files? I want the changes to be under child theme’s functions.php so if I update the theme, I can keep the changes.

    #15806

    Artem Temos
    Keymaster

    Hi,

    Do you want to change names or add a new one? If simply change names, then you can use POT file translations. Here is a video that demonstrates how to translate strings with Loco Translate plugin https://www.youtube.com/watch?v=tAFq1yTfWfU

    Regards

    #15820

    vanuch
    Participant

    Thanks, this works just fine. Was something I had to do at some point anyway (translate theme’s untranslated parts to Estonian). 🙂

    #15823

    Artem Temos
    Keymaster

    You are welcome 🙂

Tagged: ,

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘How to change the name and color of the label "SALE NEW HOT" on the menu?’ is closed to new replies.