I’m having a bit of hard time trying to get this one link/category disappear from my bredcrumb path.
The path goes as follows: home/customPostTypeCategory/subCategory/child/
, so what I need to get done is to get that customPostTypeCategory
to go away.
So as a clearness, this is a Custom post type made with Types -plugin, and breadcrumbs are using SEO by Yoast breadcrumbs.
This could be done via CSS, but that is the last solution I’m willing to use.
Any clues, tips or tricks how to do this?
Thanks!
So I solved this by using jQuery and contains -selector.
$( "#breadcrumbs a:contains('customPostTypeCategory')" ).removeAttr( "href" );
This obviously removes only the link, so that the category name still stays.
If the whole thing should be removed, then one could use the following:
$( "#breadcrumbs a:contains('customPostTypeCategory')" ).css( "display", "none" );
This did the trick for me, but it ain’t the solution I was looking and asking for.
I had the same issue with a custom post type.
After looking at the output of the array, I saw that
array(1)
was the archive, and what I believe you’re calling a category.This did the trick for me: