{"id":610,"date":"2015-11-02T03:34:40","date_gmt":"2015-11-02T03:34:40","guid":{"rendered":"http:\/\/docs.contentviewspro.com\/?p=610"},"modified":"2023-12-29T04:13:06","modified_gmt":"2023-12-29T04:13:06","password":"","slug":"doesnt-work-with-plugin-wp-youtube-lyte","status":"publish","type":"docs","link":"https:\/\/contentviewspro.com\/documentation\/article\/doesnt-work-with-plugin-wp-youtube-lyte\/","title":{"rendered":"Show Youtube video from WP YouTube Lyte plugin"},"content":{"rendered":"<p>If you are using this plugin <strong>WP YouTube Lyte<\/strong> to embed Youtube video to your post, Content Views Pro will not able to detect Youtube video url, because that plugin uses <code>httpv<\/code> as protocol for url.<\/p>\n<p>To solve this problem, please add this code to file functions.php of your active theme:<\/p>\n<pre style=\"font-size:13px\">\n\/\/ Content Views Pro - Fix problem with WP YouTube Lyte\nadd_filter( 'pt_cv_custom_media_thumbnail', 'cvp_theme_custom_media_thumbnail_ytl', 10, 2 );\nfunction cvp_theme_custom_media_thumbnail_ytl( $args, $post_content ) {\n\tpreg_match_all( '|http[sv]?:\/\/[^\\s\"\\']+|im', $post_content, $matches );\n\tif ( isset($matches[0][0]) ) {\n\t\t$matches[0][0] = str_replace( 'httpv', 'http', $matches[0][0] );\n\t\t$args = $matches;\n\t}\n\n\treturn $args;\n}\n<\/pre>\n<p>Best regards,<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are using this plugin WP YouTube Lyte to embed Youtube video to your post, Content Views Pro will not able to detect Youtube video url, because that plugin uses httpv as protocol for url. To solve this problem, please add this code to file functions.php of your active theme: \/\/ Content Views Pro &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/contentviewspro.com\/documentation\/article\/doesnt-work-with-plugin-wp-youtube-lyte\/\"> <span class=\"screen-reader-text\">Show Youtube video from WP YouTube Lyte plugin<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"doc_category":[62],"doc_tag":[21],"class_list":["post-610","docs","type-docs","status-publish","hentry","doc_category-other-plugins","doc_tag-custom-code"],"year_month":"2026-09","word_count":112,"total_views":"2","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"name":"admin1","author_nicename":"admin1","author_url":"https:\/\/contentviewspro.com\/documentation\/author\/admin1\/"},"doc_category_info":[{"term_name":"Other Plugins","term_url":"https:\/\/contentviewspro.com\/documentation\/cats\/other-plugins\/"}],"doc_tag_info":[{"term_name":"custom PHP code","term_url":"https:\/\/contentviewspro.com\/documentation\/tags\/custom-code\/"}],"_links":{"self":[{"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/docs\/610","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/comments?post=610"}],"version-history":[{"count":1,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/docs\/610\/revisions"}],"predecessor-version":[{"id":5612,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/docs\/610\/revisions\/5612"}],"wp:attachment":[{"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/media?parent=610"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/doc_category?post=610"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/contentviewspro.com\/documentation\/wp-json\/wp\/v2\/doc_tag?post=610"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}