Skip to content

Instantly share code, notes, and snippets.

@blakewilson
Created May 22, 2018 22:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blakewilson/5cb10287fceb24a34520be81b0aa7d5f to your computer and use it in GitHub Desktop.
Save blakewilson/5cb10287fceb24a34520be81b0aa7d5f to your computer and use it in GitHub Desktop.
Include a video background on every page/post
<?php
/**
* Add a video background to every page/post
*
* @version 05222018
* @author Push Labs
* @link https://pushlabs.co
*/
function theme_prefix_vidbg_every_page() {
// Add [vidbg] params as needed. Be sure to change the container to your desired container.
echo do_shortcode('[vidbg container=".YOUR_CONTAINER_HERE" mp4="#" webm="#"]');
}
add_action('wp_footer', 'theme_prefix_vidbg_every_page');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment