Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jtsternberg/b7c3b5371c6f639693b8f086859ad129 to your computer and use it in GitHub Desktop.
Save jtsternberg/b7c3b5371c6f639693b8f086859ad129 to your computer and use it in GitHub Desktop.
Show the standard resolution instagram video in WP media player below content
<?php
function dw_show_standard_res_insta_video_below_content( $content ) {
$video_src = get_post_meta( get_the_ID(), 'instagram_video_url_standard_resolution', true );
if ( $video_src ) {
$content .= '[video src="' . esc_url_raw( $video_src ) . '" /]';
}
return $content;
}
add_filter( 'the_content', 'dw_show_standard_res_insta_video_below_content', 10, 1 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment