I am developing a video + stills heavy site for my studio and would like to make all of my Vimeo videos show up in the header, so I can have it follow suit as my Revolution Slider which displays still images on all of my posts:
Since the Vimeo videos are forced to be part of “content” instead of “header” my theme [Uncode] cannot center or space the text below the video to be 30 em or approximately 50% of the page width. I want the Vimeo videos to go edge to edge like the Revolution sliders do, but I do not want to have to code each and every Vimeo video I’m adding [80-120+ and counting] — I already have plenty of 6-12 image-based sliders to build to show our work as well.
The only solution I can think of is to create a child theme and in its funcitons file, prevent the plugin from embedding the video. This is done by using a filter. Next, you will need to create a template for you your theme that can embed the video either by using the plugin function that does this or by entering the iframe code directly into the theme template.
The filter that prevents the plugin from embedding videos automatically into the post content is named “cvm_automatic_video_embed”. You can use it like this:
In child theme templates, you can use this piece of code on single video display:
Privacy & Cookies Policy
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.