Here is a safe and Yoast preferred method add_action(‘wp_head’,’add_custom_meta_description_box’); function retrieve_var1_replacement( $var1 ) { global $post; return strip_tags($post->post_content); } function register_my_plugin_extra_replacements() { wpseo_register_var_replacement( ‘%%mycustomdesc%%’, ‘retrieve_var1_replacement’, ‘advanced’, ‘this is a help text for myvar1’ ); } add_action( ‘wpseo_register_extra_replacements’, ‘register_my_plugin_extra_replacements’ ); You can now replace your %%excerpt%% with %%mycustomdesc%%