This file contains 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
<?php | |
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/ | |
/* | |
* Replace Disallow with Allow Generated Robots.txt | |
* Credit: Unknown | |
* Last Tested: June 09 2020 using WordPress 5.4.1 | |
*/ | |
add_filter('robots_txt','custom_robots'); |
This file contains 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
<?php | |
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/ | |
/* | |
* Yoast SEO Custom label for Business Phone 2 | |
* Credit: Yoast development team | |
* Last Tested: Apr 28 2017 using Yoast SEO Local 4.6 on WordPress 4.7.4 | |
*/ | |
add_filter( 'wpseo_local_contact_details', 'yoast_local_label_change_phone_2', 10, 1 ); |
This file contains 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
<?php | |
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/ | |
/* Remove Yandex tags from Yoast SEO Video | |
* Credit: Yoast development team | |
* Last Tested: May 12 2017 using Yoast SEO Video 4.7 on WordPress 4.7.4 | |
*/ | |
add_filter( 'wpseo_video_yandex_support', '__return_false' ); |
This file contains 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
<?php | |
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/ | |
/* Remove Yoast SEO Dashboard Widget | |
* Credit: Unknown | |
* Last Tested: Sep 15 2022 using Yoast SEO 19.6.1 on WordPress 6.0.2 | |
*/ | |
add_action('wp_dashboard_setup', 'remove_wpseo_dashboard_overview' ); |
This file contains 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
<?php | |
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/ | |
/* Change the canonical link for the shop page | |
* Credit: Scott Weiss of somethumb.com | |
* Yoast Doc: https://developer.yoast.com/features/seo-tags/canonical-urls/api/ | |
* Last Tested: Jan 25 2017 using Yoast SEO 6.0 on WordPress 4.9.1 | |
*/ | |
add_filter( 'wpseo_canonical', 'yoast_seo_canonical_change_woocom_shop', 10, 1 ); |
This file contains 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
<?php | |
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/ | |
/* Remove Yoast SEO Title From All Pages | |
* Credit: Yoast Team | |
* Last Tested: Jun 17 2020 using Yoast SEO 14.3 on WordPress 5.4.2 | |
*/ | |
add_filter( 'wpseo_title', '__return_false' ); |
This file contains 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
<?php | |
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/ | |
/* Remove Yoast SEO user roles | |
* Credit: Yoast Team | |
* Last Tested: Oct 25 2017 using Yoast SEO 5.7.1 on WordPress 4.8.2 | |
*/ | |
// Remove Yoast `SEO Manager` role | |
if ( get_role('wpseo_manager') ) { | |
remove_role( 'wpseo_manager' ); |