Created
May 22, 2018 22:00
-
-
Save blakewilson/5cb10287fceb24a34520be81b0aa7d5f to your computer and use it in GitHub Desktop.
Include a video background on every page/post
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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