Skip to content

Instantly share code, notes, and snippets.

@tacoverdo
Last active February 5, 2022 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tacoverdo/1b9c482825a7450f4ada to your computer and use it in GitHub Desktop.
Save tacoverdo/1b9c482825a7450f4ada to your computer and use it in GitHub Desktop.
Disable Google's Sitelink Search Box in WordPress SEO (Premium)
<?php
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/
// This disables the Google Sitelink Search Box functionality in WordPress SEO (Premium)
add_filter('disable_wpseo_json_ld_search', '__return_true');
@stillingen
Copy link

Thanks for sharing this. I have also looked through the list of actions and filters on - https://yoast.com/wordpress/plugins/seo/api/ to find out how to modifying schema type from "WebSite" to "WebPage" and customise the "name" parameter. Are there filters for this as well?

We are building a solution based on Wordpress multisite, where subsites are not 'separate websites' but rather webpages under the primary site.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment