Created
September 29, 2020 06:08
-
-
Save ochui/ebe1a692e88da9cf3a37c692f3d1e76d to your computer and use it in GitHub Desktop.
Override Yoast SEO existing title or meta template variable
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
function filter_wpseo_replacements( $replacements ) { | |
if( isset( $replacements['%%currentmonth%%'] ) ){ | |
$replacements['%%currentmonth%%'] = 'Sept'; | |
} | |
return $replacements; | |
}; | |
// Add filter | |
add_filter( 'wpseo_replacements', 'filter_wpseo_replacements', 10, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment