Get all Youtube video’s from posts and embed them on a different page
Another method can be like this, On the current post when you save look for youtube video in the content, if found save it to the transient ‘videos’ and the post_id (for the link to the post later) insted of regex im using parse_url() and parse_str() add_action( ‘save_post’, ‘save_youtube_videos’ ); function save_youtube_videos( $post_id ) { … Read more