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
/** | |
* Add the 'isAccessibleForFree' property to Yoast's Article schema. | |
* | |
* @param array $data The Article schema data. | |
* @return array The modified schema data. | |
*/ | |
function add_is_accessible_for_free_to_article_schema( $data ) { | |
// Set the property to true. You can change this to false if needed. | |
$data['isAccessibleForFree'] = true; |
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
const getShortcodes = (shortcodes) => { | |
shortcodes.push("analyze_field"); | |
return shortcodes; | |
}; | |
wp.hooks.addFilter( "yoast.analysis.shortcodes", "getShortcodes", getShortcodes ); |
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
add_filter( 'wpseo_robots', function ( $robots ) { | |
if ( is_single() ) { | |
return 'noindex,follow'; | |
} | |
return $robots; | |
}); |