Last active
April 28, 2023 08:37
-
-
Save mattiasghodsian/4a0842f4ac39744474fbdb12f0141b38 to your computer and use it in GitHub Desktop.
Remove yoast bredcrumb ld+json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Title: Remove yoast bredcrumb ld+json | |
| * Author: Mattias Ghodsian | |
| * Description: This removes the schema (json+ld) from yoast | |
| * Donate a cup of coffee: https://www.buymeacoffee.com/mattiasghodsian | |
| * Donate Eth: 0xBBB96204E45D11C9799c6B12E6eE6F0d4A071Ef5 | |
| **/ | |
| function remove_yoast_breadcrumb_json_ld($data) | |
| { | |
| if ( $data['@type'] == 'BreadcrumbList') { | |
| $data = ""; | |
| } | |
| return $data; | |
| } | |
| add_filter('wpseo_json_ld_output', 'remove_yoast_breadcrumb_json_ld', 10, 1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment