Change the word HOME in the breadcrumb trail

Updated February 24, 2016: Added the option to output either some text or a Font Awesome icon.
In case you want to change the default word “Home” in the breadcrumb trail, to something different, this snippet will allow to change it.
To use standard characters:
just paste this function into your child-theme functions.php file.

/************************************************************************/ 
/* Change Breadcrumb trail 'Home' to 'Custom Word' or Font Awesome icon
/************************************************************************/
add_filter( 'tc_breadcrumb_trail_args', 'my_breadcrumb_home_word' );
function my_breadcrumb_home_word($args) {
    $new_args = array(
             'container'  => 'div' ,        // div, nav, p, etc. [without this parameter it won't work]
             'separator'  => '→' ,          // default is » choose any special character you want: |, >, ⇒, ->, ~, etc. 

             // 'show_home'  => __( 'Some Name ' , 'customizr' )  //this option outputs some text
             'show_home'  => '<span class="fa fa-home"></span>'  // this option is for font awesome http://fortawesome.github.io/Font-Awesome/icon/home/
         );
    return array_merge($args, $new_args);
}

Note: To use additional Font Awesome icons we need to enable them through the customize option panel.

Select Customize, Advanced option, Front-end Icons (Font Awesome) and enable Load Font Awesome CSS

9 thoughts on “Change the word HOME in the breadcrumb trail”

Comments are closed.