Support » Plugin: Video Background » Use of Template pages?

  • Resolved Parmenti


    Hello.. how can I make use of this plugin on a template page? For instance front-page.php?

Viewing 1 replies (of 1 total)
  • Plugin Contributor Blake


    Hi Parmenti,

    Thanks for using Video Background.

    You sure can do this. However, instead of modifying the front-page.php file, I would add a custom function to the functions.php file using the do_shortcode() function and include the Video Background shortcode. Here is an example:

    function vidbg_front_page() {
      // Your conditional for front page
      if( ! is_front_page() ) {
      // Your Video Background shortcode
      echo do_shortcode( '[vidbg container="body" mp4="#" webm="#" poster="#" muted="true" loop="true" overlay="false" overlay_color="#000" overlay_alpha="0.3"]' );
    add_action( 'wp_footer', 'vidbg_front_page' );


Viewing 1 replies (of 1 total)
  • The topic ‘Use of Template pages?’ is closed to new replies.