替换woocommerce面包屑中的home链接

我知道这是一个愚蠢的问题, 但是像个傻瓜一样, 我找不到正确的答案。

此刻, 这就是我的面包屑

家/男性配音/德里克·道尔(Derek Doyle)

我需要将家庭链接名称更改为Voice Overs, 并将其链接到另一个页面。

请任何帮助将是巨大的。

谢谢


#1


Woocommerce为此提供了过滤器。

add_filter( 'woocommerce_breadcrumb_defaults', 'jk_change_breadcrumb_home_text' );
function jk_change_breadcrumb_home_text( $defaults ) {
    // Change the breadcrumb home text from 'Home' to 'Voice Overs'
    $defaults['home'] = 'Voice Overs';
    return $defaults;
}

add_filter( 'woocommerce_breadcrumb_home_url', 'woo_custom_breadrumb_home_url' );
function woo_custom_breadrumb_home_url() {
    return 'http://yoursite.com/voice-overs';
}

在functions.php文件中使用这些过滤器可获得所需的结果。

Customize the WooCommerce breadcrumb

来源:

https://www.srcmini02.com/66635.html

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_40388.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?