This comment has been minimized.
This comment has been minimized.
How do I change the yoast_seo_breadcrumb_remove_link.php to accept 2 words? I have a multilingual website using Products and Producten? |
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
How can I delete 'Products' in Json-ld? |
This comment has been minimized.
This comment has been minimized.
@meisterx2020 I think it's late to answer, but may be useful for others. With 'wpseo_breadcrumb_single_link' hook you may change only the front end breadcrumbs output (i.e., HTML markdown). The filter used in another generation process than JSON-LD. With 'wpseo_breadcrumb_links' hook you may filter the source data of the breadcrumbs: both for front end and JSON-LD. Worth to mention that autogenerated array $links has another type of values than shown in 'Append link' example https://gist.github.com/amboutwe/ea0791e184668a5c7bd7bbe357c598e9#file-yoast_seo_breadcrumb_append_link-php
You're able to remove an item from breadcrumbs source completely or add/replace an item using the structure shown in examples.
|
This comment has been minimized.
This comment has been minimized.
Is there way to change the parent category url to custom url. Thanks |
This comment has been minimized.
This comment has been minimized.
Any ideas how to change the pathway for posts of a particular category only? So all posts in my 'Current' category would link back to a URL page on my site, rather than to the Current archive page. Many thanks |
This comment has been minimized.
This comment has been minimized.
Modified it to only remove the href link and keep the breadcrumb : ` add_filter( 'wpseo_breadcrumb_single_link' ,'wpseo_remove_breadcrumb_link', 10 ,2);
|
This comment has been minimized.
This comment has been minimized.
Can someone help me to delete the subcategory in all breadcrumbs? I need this to custom display posts on my theme, but I dont want to have access the subcategory anywhere. Example : And on some other pages I need to remove the parent category as well: Example : I thank you a lot. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I am wondering if there is a way to disable the parent link from the child page. Home >> About >> Our Council Technically 'About' is not a Page, its the parent menu item that leads to 'Our Council' Right now I'm using jquery to remove the link. It's nice because my breadcrumbs are intact but I don't like that I see it flash for a second with the link before the jquery removes the href. $( "#breadcrumbs a:contains('About')" ).removeAttr( "href" ); I've thought about using something like this $content = preg_replace("/(.*?)</a>/","",$content); but would need to really understand the plugin code to make something like this work. |
This comment has been minimized.
This comment has been minimized.
Your code does almost what I want. Your code removes the link completely. I just want it to remove the href. I still like having the path. I just don't want that parent item click able. Thanks! add_filter( 'wpseo_breadcrumb_single_link' ,'wpseo_remove_breadcrumb_link', 10 ,2); function wpseo_remove_breadcrumb_link( $link_output , $link ){ |
This comment has been minimized.
This comment has been minimized.
I was able to figure my question out based on the previous responses. Thanks for sharing the initial post. Was very helpful. add_filter( 'wpseo_breadcrumb_single_link' ,'wpseo_remove_breadcrumb_link', 10 ,2); function removeBreadcrumbLink($link_output , $link) { |
This comment has been minimized.
Modified this to target based on url. :)