Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #424691

    Hi, how can this be done with a childtheme?
    https://kriesi.at/support/topic/removing-category-in-the-blogs-breadcrumb/
    If i follow your advice i have to do this with every Theme-Update again and this is not as it meant to be.
    Werner

    #424939

    Hi awel!

    Try adding this to your child theme style.css file.

    .breadcrumb-trail > span:nth-child(4), .breadcrumb-trail > span:nth-child(5) {
      display: none !important;
    }

    Regards,
    Elliott

    #425179

    Hi!
    Your code remove all sites from the breadcrumb. This isn’t what i need.
    Please look at this screenshot: https://nimbus.everhelper.me/client/notes/share/189661/aPTlyhumAH2TBmpAmFQgJDuU3VyfpAVo/
    You see that one link go to the SITE “Fotoblog” and the other link to the CATEGORY “Fotoblog”. What i need is to undisplay the SITE-LINK “Fotoblog” on the blog post page (only her, not an the blog main page).
    Her is the online version: http://enfold.rightlight-studios.de/fotoblog/sonstiges/theme-test-mobile-ready/

    Your code from above remove also the site-link on the blog main page: http://enfold.rightlight-studios.de/blog/

    • This reply was modified 9 years, 1 month ago by awel.
    #425205

    Hey!

    Please try using the code as following

    .archive .breadcrumb-trail > span:nth-child(4), .archive .breadcrumb-trail > span:nth-child(5) {
      display: none !important;
    }

    Regards,
    Yigit

    #425215
    #426050

    Hi!

    Hmm, not sure if there is an easy way to do this in a child theme. I let our devs know about it so if there is an easy way they will reply here. Otherwise I would just keep editing the parent breadcrumbs file and wait for the next update. Perhaps we will get an option where you can do something like this.

    add_filter( 'avia_breadcrumbs_args', 'enfold_customization_remove_breadcrumb_categories', 10, 1 );
    function enfold_customization_remove_breadcrumb_categories( $args ) {
    	$args['show_categories'] = false;
    	return $args;
    }

    Cheers!
    Elliott

    #426138

    Hi!
    Can we use this code somewhere? Should it be copied in the function.php? I think I understand your answer not properly…

    #426142

    This can be achieved by using the filter avia_breadcrumbs_trail. To remove the second breadcrump ( the element with index 1 from the array) put the following code into your functions.php of your child theme:

    add_filter( 'avia_breadcrumbs_trail', 'mmx_remove_element_from_trail', 50, 2 );
    function mmx_remove_element_from_trail( $trail, $args ) {
    	if ( is_single() ) {
    		unset ($trail[1]);
    	}
    	return $trail;
    }
    

    The condition of the if statement controls where (page, post, archive, etc.) the removal should take place.

    #426148

    Hi mensmaximus, you made my day! It works perfectly!

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Remove "Category" from breadcrumb’ is closed to new replies.