Support » Plugin: Video Background » Applying video background to body site-wide

  • Resolved surfpark

    (@surfpark)


    Is it possible to use this plugin to apply a video background for all pages? For example, applying a video for the background of the body container on all pages.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Blake

    (@blakedotvegas)

    Hi Surfpark,

    This is very possible. You will want to use a function to do this. Something like this will work:

    /**
     * Function to add [vidbg] shortcode to every page's footer.
     */
    function theme_vidbg_add_to_every_page() {
      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', 'theme_vidbg_add_to_every_page' );
    • This reply was modified 12 months ago by  Blake.

    where do we add this code within the theme to produce video in footer on every page on site? ty

    Plugin Contributor pushlabs

    (@pushlabs)

    Hi jfpyle,

    You would use the same code posted above, however, change the “container” property in the shortcode.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Applying video background to body site-wide’ is closed to new replies.