Hiding blog's name from breadcrumbs

Hi there,

I have asked earlier about hot to remove blog’s name from the breadcrumbs and I received this css:

.single .x-crumbs-list .x-crumbs-list-item:last-child,
.single .x-crumbs-list .x-crumbs-list-item:nth-last-child(2) > span.x-crumbs-delimiter {
display: none;
}

Unfortunatelly, it doesnt remove the blog’s name, but the post’s title from the breadcrumbs. (post’s title is the last element). How to remove the blog’s title?

thank you.
beata

Hello @tashitendrel,

Thanks for writing in! :slight_smile:

To hide blog text in breadcrumbs, kindly add this code to your child theme’s functions.php file.

my_breadcrumbs_data( $args  ) {    
    $args["blog_label"] = "";
    return $args;
}

add_filter( 'x_breadcrumbs_data_args', my_breadcrumbs_data );

Hope this helps.

Hi,

I tried to put it it there and save, but Wordpress is showing this worning:

Your PHP code changes were rolled back due to an error on line 278 of file wp-content/themes/xpro-child/functions.php. Please fix and try saving again.
syntax error, unexpected ‘{’

What to do?

Hi there,

Please try this:

function my_breadcrumbs_data( $args  ) {    
    $args["blog_label"] = "";
    return $args;
}

add_filter( 'x_breadcrumbs_data_args', my_breadcrumbs_data );

Hope this helps.

yes, that helps, thank you.
However now I have something like this – 2 arrows with empty space between. Would it be also possible to remove one arrow?

thank you,
beata

Hi again,

You can add the following CSS in Theme Options > CSS to remove the extra delimeter:

.single-post .x-breadcrumbs span.delimiter:nth-child(2) {
    display: none;
}

Let is know how this goes!

Thank you, but unfortunatelly it doesnt change anything…

Hi there,

Please provide the link to the page of the site so that we can check it.

Thank you.

Sure, it is here:

http://dharmaebooks.org/illuminating-sun/

Hi there,

Please try this:

.single-post .x-crumbs .x-crumbs-list-item:nth-child(2) {
    display: none;
}

Hope this helps.

Yes, it helps. Thank you

You are most welcome. :slight_smile:

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