Removing "Home" from Breadcrumbs

Community Forums Forums Design Tips and Tricks Removing "Home" from Breadcrumbs

This topic is: not resolved

This topic contains 4 replies, has 3 voices, and was last updated by  Tony @ AlphaBlossom 4 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #119439

    suburbanite
    Member
    Post count: 26

    I would like to remove the “Home” link from my breadcrumbs. For instance, right now, it says:

    Home / Portfolio / Branding / Branding Portfolio Item 3

    I think “Home” is redundant, so I’d like to remove it. How do I do this?

    http://www.angelawdesign.com
    #119444

    genwrock
    Member
    Post count: 937

    Add the following code in your functions.php file

    add_filter('genesis_breadcrumb_args', 'custom_breadcrumb_args');
    function custom_breadcrumb_args($args) {
       $args['home'] = '';
       return $args;
    }

    See My PRO Genesis Child Themes | Need Genesis Developer? | Follow Me on Twitter

    #119447

    Tony @ AlphaBlossom
    Participant
    Post count: 544

    Hi genwrock,

    I hope you don’t mind me jumping in…if I’m not mistaken, “genesis_breadcrumb_args” will remove the home text, but the home markup and opening “/” will remain.

    You have to use the “genesis_home_crumb” filter to completely remove this:

    
    // Remove "Home" text and markup from breadcrumbs
    add_filter ( 'genesis_home_crumb', 'youruniqueprefix_breadcrumb_home_link' ); // Genesis >= 1.5
    function youruniqueprefix_breadcrumb_home_link( $crumb ) {
         $crumb = '';
         return $crumb;
    }
    

    Hope that helps.

    Tony


    #119507

    suburbanite
    Member
    Post count: 26

    Thank you Tony, yes I had already tried the breadcrumb_args code and it wasn’t working for me. This worked perfectly, thanks!

    #119562

    Tony @ AlphaBlossom
    Participant
    Post count: 544

    Awesome, glad I could help!


Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.