How to Load Vimeo Video Into Header?

New thread 1 posts from 2 participants
  • Started 2 years, 5 months ago ago by Todd S.
  • Replied 2 years, 5 months ago ago by Constantin
Viewing 2 posts - 1 through 2 (of 2 total)
  • #2872

    Todd S.

    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:

    images: text / content is correct:

    FOUR RIVERS (Chu-Bzhi)


    videos: text / videos are incorrect:


    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.

    Any solutions?




    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:

    Additionally, here’s a tutorial that shows how to create a child theme that embeds the videos in a different way:

    The tutorial is for theme Twenty Fifteen but you can make an idea on how to use plugin filters and functions to achieve your goal.

    Please let me know if you have any other questions, thank you.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.