Quantcast
Channel: WordPress.org Forums » [Yoast SEO - Advanced SEO with real-time guidance and built-in AI] Support
Viewing all articles
Browse latest Browse all 42467

ronald_123 on "[Plugin: WordPress SEO by Yoast] Use SubHeading as default meta description"

$
0
0

Adding this to functions.php did the job for me:

function wpseo_metadesc_subheading( $description ) {
	global $post;
	if ( $subheading = get_post_meta( $post->ID, '_subheading', true ) ) {
		return $subheading;
	}
	return $description;
}
add_filter( 'wpseo_metadesc', 'wpseo_metadesc_subheading' );

Thanks to SubHeading plugin author Steve for that.


Viewing all articles
Browse latest Browse all 42467

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>