Skip to content

Instantly share code, notes, and snippets.

@jdevalk
Created April 26, 2013 06:55
Show Gist options
  • Save jdevalk/5465432 to your computer and use it in GitHub Desktop.
Save jdevalk/5465432 to your computer and use it in GitHub Desktop.
Add excerpt to the content to be scanned by the WP SEO Video plugin
<?php
function fix_content_input( $content, $vid ) {
$post = get_post( $vid['post_id'] );
if ( !empty( $post->post_excerpt ) )
$content = "\n" . $post->post_excerpt . "\n" . $content;
return $content;
}
add_filter( 'wpseo_video_index_content', 'fix_content_input', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment