Remove / Hide Latest Posts Page in Breadcrumbs (Icon stack)

I’m looking to hide or remove home/latest posts page from breadcrumbs when setting static home page is set for SEO purposes.

Example Url: https://reviewer.co/cases & https://reviewer.co/cases/streacom-bc1-mini-v2

If this isn’t possible, can you add an option in theme settings for Icon stack so it can be renamed as with the Integrity stack.

Hi Leonard,

Thanks for reaching out.
To remove the Blog from the breadcrumb in the Post Details page you need to add the following code into your Child Theme’s functions.php file.

add_filter('x_breadcrumbs_data', 'post_parent_trail', 9999999, 2);
function post_parent_trail ($crumbs, $args) 
{
    if ( is_singular('post') ) 
    {
        unset($crumbs[1]);				
    }
    return $crumbs;  
}

Please remember that the above code will work if copied as it is and doesn’t conflict with any existing style.
Please note that the code provided serves only as a guide to help you get started custom coding on your own if there’s no option offered in our theme or the products we bundle.
We do not provide support for custom codes which means we can’t fix it in case it conflicts with something on your site nor will we enhance it.

Thanks

1 Like

This has done the trick for posts. How can it be extended to categories, tags, archives etc.

I’m looking to remove this from the breadcrumbs across the entire site. Many thanks.

Hey Leonard,

Regretfully, we cannot provide you with further enhancements to the custom code as that is beyond the scope of our theme support.

Please consider subscribing to our One premium support if you wish to receive further guidance on this.

Thanks.

Thanks for the code, should be able to manipulate it to cover categories, tags, etc. Many thanks :blush:

You are most welcome, Leonard.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.