Remove link with ld+json ??
-
Hi,
I have code:add_filter( 'wpseo_breadcrumb_single_link', 'wpseo_remove_breadcrumb_link', 10 ,2); function wpseo_remove_breadcrumb_link( $link_output , $links ){ $page_src = $links['url']; $last_word = basename( $page_src ); $text_to_remove = 'sklep'; if( $last_word == $text_to_remove ) { $link_output = ''; } return $link_output; }
This removes the link from HTML, but does not remove it from ld+json.
As with “@type”: “BreadcrumbList”, Remove:{ "@type": "ListItem", "position": 2, "item": { "@type": "WebPage", "@id": "https://localhost/test/sklep/", "url": "https://localhost/test/sklep/", "name": "Sklep" } },
Anyone can help?
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Remove link with ld+json ??’ is closed to new replies.