Support » Plugin: Video Background » Adding Video Background to entire site pages in functions

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

    (@blakedotvegas)

    Hi greataussiewebdesigns,

    You sure can do this. You can achieve this by using the wp_footer() action to add the shortcode to every page, like so:

    function themeprefix_vidbg_shortcode() {
      echo do_shortcode( '[vidbg container="body" mp4="#" webm="#"]' );
    }
    add_action( 'wp_footer', 'themeprefix_vidbg_shortcode' );

    Please let me know if this solves your issue!

    Also, thank you for the review, it is much appreciated 🙂

    Regards,
    Blake

    Cheers Blake,

    Your the best!

    I also found another solution that worked flawlessly…

    just added my custom shortcode to the theme header

    <?php echo do_shortcode('[vidbg container="body" mp4="http://orange.greataussiewebdesigns.com.au/wp-content/themes/concierge/assets/video/Sail-Away.mp4" webm="http://orange.greataussiewebdesigns.com.au/wp-content/themes/concierge/assets/video/Sail-Away.webm" poster="http://orange.greataussiewebdesigns.com.au/wp-content/themes/concierge/assets/video/Sail-Away.jpg" loop="true" overlay="false" overlay_color="#000" overlay_alpha="0" muted="false"]'); ?>

    Perfect!

    Col

    Plugin Author Blake

    (@blakedotvegas)

    Glad you found a solution!

    Have a great day and thanks for using Video Background!

    Regards,
    Blake

    This rocks. Was looking to do this, and this worked perfectly, thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Adding Video Background to entire site pages in functions’ is closed to new replies.