Created
January 31, 2014 02:51
-
-
Save emaildano/8725832 to your computer and use it in GitHub Desktop.
Add ACFs to Yoast SEO page analysis.
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
function add_custom_content_to_analysis( $content ) { | |
global $post; | |
$custom = get_post_custom( $post->ID ); | |
$custom_content = ''; | |
foreach( $custom as $field ) | |
{ | |
$custom_content .= $field[0].' '; | |
} | |
return $content . ' ' . $custom_content; | |
} | |
add_filter( 'wpseo_pre_analysis_post_content', 'add_custom_content_to_analysis' ); | |
// source | |
// http://wordpress.org/support/topic/how-to-wpseo_pre_analysis_post_content#post-4843463 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Awesome!