Quantcast
Channel: XTemos » All Posts
Viewing all articles
Browse latest Browse all 39769

Changing labels on header links

$
0
0

Hi!

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 );
}

Private Content Hidden

Viewing all articles
Browse latest Browse all 39769

Trending Articles