Home › Forums › Basel support forum › Changing labels on header links
Changing labels on header links
- This topic has 13 replies, 2 voices, and was last updated 8 years, 1 month ago by Artem Temos.
-
AuthorPosts
-
December 3, 2016 at 7:12 pm #7535
MilanBatinicParticipantHi!
I have breadcrumb with label “Hem” on product pages which is how i want it to be.
On my-account page (only page on website with “Page title” option enabled) breadcrumb label is “Home”. Any idea on how to fix that?One more question, I need to change labels on header links (Log in/Register, My Account/Log out).
I have tried to put this peace of code into my child themes functions and it worked except for the “Log out” label was missing when user is logged in. How can I fix this?function basel_get_header_links() {
$links = array();if( ! basel_woocommerce_installed() ) return $links;
$account_link = get_permalink( get_option(‘woocommerce_myaccount_page_id’) );
if( basel_get_opt( ‘login_links’ ) ) {
if( is_user_logged_in() ) {
$links[] = array(
‘label’ => esc_html__(‘Mitt konto’, ‘basel’),
‘url’ => $account_link
);
} else {
$links[] = array(
‘label’ => esc_html__(‘Logga in / Registrera’, ‘basel’),
‘url’ => $account_link
);
}
}return apply_filters( ‘basel_get_header_links’, $links );
}December 4, 2016 at 2:09 am #7537
Artem TemosKeymasterHello,
Thank you so much purchasing our theme and contacting our support center.
We suggest you to edit/translate all strings on the site including Login, Logout, My Account, Home with POT files using Loco Translate Plugins. Here is a video tutorial that should help you https://www.youtube.com/watch?v=tAFq1yTfWfU&t=1s
Kind Regards
XTemos StudioDecember 4, 2016 at 11:04 pm #7554
MilanBatinicParticipantThank you for answering in such short notice.
Loco was helpful but it left me with some of the work undone.
Translation did not work on Log in / Register label and it has not changed “Home” label in breadcrumb on “my-account” page.December 5, 2016 at 6:50 am #7555
Artem TemosKeymasterHi,
We see that “Home” word was not translated at all. The only one problem now is “Login / Register”. Could you send us your FTP access so we could check it? Or we will send you a workaround how you can translate it manually with PHP files.
Regards
December 5, 2016 at 8:48 am #7556
MilanBatinicParticipantHi,
please send a workaround, i would like to learn myself how this problem can be solved.Kind regards
MilanDecember 5, 2016 at 10:21 am #7557
Artem TemosKeymasterHi,
Try to override this function in your child theme functions.php file and change text in the source code. So simply put this code to your functions.php file in the child theme and edit “Login / Register” text
function basel_get_header_links() { $links = array(); if( ! basel_woocommerce_installed() ) return $links; $account_link = get_permalink( get_option('woocommerce_myaccount_page_id') ); $logout_link = wc_get_endpoint_url( 'customer-logout', '', wc_get_page_permalink( 'myaccount' ) ); if( basel_get_opt( 'login_links' ) ) { if( is_user_logged_in() ) { $links[] = array( 'label' => esc_html__('My Account', 'basel'), 'url' => $account_link ); $links[] = array( 'label' => esc_html__('Logout', 'basel'), 'url' => $logout_link ); } else { $links[] = array( 'label' => esc_html__('Login / Register', 'basel'), 'url' => $account_link ); } } return apply_filters( 'basel_get_header_links', $links ); }
Regards
December 5, 2016 at 10:57 pm #7600
MilanBatinicParticipantHi!
I am not sure if i’m doing something wrong. I did copy/paste of the code you’ve sent and the website went down reporting an error on one of the lines. I really need to change these labels so I am sending you FTP log in details so you can try to fix yourselves. Please try not to crash my website 🙂Kind regards
MilanDecember 6, 2016 at 7:39 am #7604
Artem TemosKeymasterHi,
Ok, we have added the code and now you are able to edit these texts in basel-child/functions.php file.
Regards
December 6, 2016 at 11:34 am #7611
MilanBatinicParticipantHi and thanks a lot guys!
Your response was really fast and helpful. You are going to get the best grade from me.
I have one more question which is off topic. How do I upgrade “WPBakery Visual Composer” plugin which came with theme?December 6, 2016 at 11:51 am #7614
Artem TemosKeymasterHello,
If you have the latest theme version installed then you can update Visual Composer plugin from Appearance -> Install plugins.
Regards
December 6, 2016 at 12:08 pm #7615
MilanBatinicParticipantHi,
i have themes latest version but Visual Composer does not appear in Appearance -> Install plugins.
Should I uninstall it first?Regards,
MilanDecember 6, 2016 at 2:01 pm #7617
Artem TemosKeymasterIn this case, you are running the latest version of Visual Composer available with our theme. If a new one is already released we will add it in our next theme update.
Regards
December 6, 2016 at 2:09 pm #7621
MilanBatinicParticipantHi,
thanks for info and again a big thank you for helping me to make changes on labels.Best wishes!
MilanDecember 6, 2016 at 4:18 pm #7627
Artem TemosKeymasterHi,
We are happy to help you 🙂
Regards
-
AuthorPosts
- You must be logged in to create new topics. Login / Register