Home › Forums › Basel support forum › Create label
Create label
- This topic has 2 replies, 2 voices, and was last updated 6 years, 11 months ago by Artem Temos.
Viewing 3 posts - 1 through 3 (of 3 total)
-
AuthorPosts
-
November 19, 2017 at 7:02 pm #24686
coutmParticipantHi,
I would like to know if I can create a own label for the menu (see the attachment). You create HOT, SALE and NEW, but I would like to add some new label. And if I can, I would like to know how I do?
Thank you!
Attachments:
You must be logged in to view attached files.November 19, 2017 at 7:08 pm #24688
coutmParticipantFor this moment, you see «cool» in my label field because I change Hot for Cool with WPML. But I really want to create a lot of label.
November 20, 2017 at 7:12 am #24707
Artem TemosKeymasterHi,
Unfortunately, there are no additional labels options in our theme. You can do this only with additional customization.
1. Firstly, you need to add an option in the file
inc / third-party / nav-menu-images / inc / walker.php
find this code
<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>
and add more options like this
<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> <option value="custom" <?php selected( $label, 'custom', true); ?>><?php _e('Custom', 'basel'); ?></option>
then, edit this file
inc / functions.php
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; }
Replace with this
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; case 'custom': $label_text = esc_html__('Custom', 'basel'); break; }
Regards
-
AuthorPosts
Tagged: Label
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to create new topics. Login / Register