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 *********/ | |
/* Exclude One Taxonomy From Yoast SEO Sitemap | |
* Credit: Yoast KB https://kb.yoast.com/kb/how-to-customize-the-sitemap-index/ | |
* Last Tested: Apr 05 2018 using Yoast SEO 7.2 on WordPress 4.9.5 | |
********* | |
* Please note that changes will be applied upon next sitemap update. | |
* To manually refresh the sitemap, please disable and enable the sitemaps. | |
*/ |
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 return `?replytocom` variables | |
* Credit: Yoast development team | |
* Last Tested: Mar 23 2018 using Yoast SEO 7.1 on WordPress 4.9.4 | |
*/ | |
add_filter( 'wpseo_remove_reply_to_com', '__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 Date Meta Tags Output by Yoast SEO | |
* Credit: Yoast development team | |
* Last Tested: Apr 09 2019 using Yoast SEO 10.1.3 on WordPress 5.1.1 | |
* For Yoast SEO 14.0 or newer, please see https://yoast.com/help/date-appears-search-results/#h-managing-dates | |
*/ | |
add_action('wpseo_dc_'.'DC.date.issued', '__return_false'); // Premium versions 5.2 or older |
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 *********/ | |
/* Disable Yoast SEO Primary Category Feature | |
* Credit: Yoast development team | |
* Last Tested: Jan 24 2017 using Yoast SEO 4.1 on WordPress 4.7.1 | |
*/ | |
add_filter( 'wpseo_primary_term_taxonomies', '__return_empty_array' ); |
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 from front end for a single post or page | |
* Credit: Dodinas https://stackoverflow.com/questions/37845968/disable-wordpress-yoast-seo-on-single-page | |
* Last Tested: Nov 08 2019 using Yoast SEO 12.4 on WordPress 5.2.4 | |
* Note: For version 14+, please use the code here: https://developer.yoast.com/customization/yoast-seo/disabling-yoast-seo | |
********* | |
* DIFFERENT POST TYPES | |
* Post: Change 123456 to the post ID | |
* Page: Change is_single to is_page and 123456 to the page ID |
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 all JSON output by Yoast SEO | |
* Credit: Yoast development team | |
* Documentation: https://developer.yoast.com/schema-documentation/api/ | |
* Last Tested: Apr 16 2019 using Yoast SEO 11.0 on WordPress 5.1.1 | |
*/ | |
add_filter( 'wpseo_json_ld_output', '__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 *********/ | |
/* Add Sitemap Index To Generated Robots.txt | |
* Credit: Ben https://github.com/retlehs | |
* Last Tested: Mar 13 2017 using Yoast SEO 4.4 on WordPress 4.7.3 | |
*/ | |
add_action('do_robots', 'custom_robotstxt'); |
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 *********/ | |
/* Prevent Yoast SEO for adding specific post types to indexables | |
* Credit: Yoast team | |
* Last Tested: Jan 18 2021 using Yoast SEO 15.6.2 on WordPress 5.6 | |
* Documented: https://github.com/Yoast/wordpress-seo/blob/trunk/src/helpers/post-type-helper.php#L90 | |
* Common post types: 'post', 'page', 'attachment', 'product' | |
*/ |
OlderNewer