-
AuthorPosts
-
April 7, 2015 at 2:17 pm #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.
WernerApril 7, 2015 at 8:55 pm #424939Hi 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,
ElliottApril 8, 2015 at 11:32 am #425179Hi!
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, 8 months ago by awel.
April 8, 2015 at 12:46 pm #425205Hey!
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,
YigitApril 8, 2015 at 12:52 pm #425215Nothing happens with this code.
http://enfold.rightlight-studios.de/fotoblog/sonstiges/theme-test-mobile-ready/April 9, 2015 at 4:38 pm #426050Hi!
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!
ElliottApril 9, 2015 at 6:41 pm #426138Hi!
Can we use this code somewhere? Should it be copied in the function.php? I think I understand your answer not properly…April 9, 2015 at 6:50 pm #426142This 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.
April 9, 2015 at 7:04 pm #426148 -
AuthorPosts
- The topic ‘Remove "Category" from breadcrumb’ is closed to new replies.