Reply To: Tag «Read More»

#271

Constantin
Keymaster

You could try something like this (please note that this will work only for newly imported videos). Enter the code below in your theme functions.php file:

/**
 * Filter the post content on new video insert
 */
function twentythirteen_cbc_video_content( $post_content, $video, $theme_import ){
	// check if importing in theme
	if( !$theme_import ){
		return $post_content;
	}
	
	// we want to add the video link to post content at the beginning
	$video_url = 'http://www.youtube.com/watch?v='.$video['video_id'];
	
	return $video_url."\n (more…)