[Support request] Add Video Background to Simulate parallax

Home Forums Support [Support request] Add Video Background to Simulate parallax

Home Forums Support Add Video Background to Simulate parallax

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #576442
    Ryan

    Hi Guys! So far so good with GP!

    I am trying to add video to the background of a page header while using a transparent image so I can simulate a parallax background. I just need to target the right div.

    How can I add a function to insert code after the page header tag?

    I have tried this:

    add_action( ‘generate-inside-page-header-content’, ‘home_page_video’ );
    function home_page_video() {
    if ( is_front_page() ) {
    ?>

    <video autoplay muted loop id=\’myVideo\’>
    <source src=\’http://104.254.95.130/~catapultwp/wp-content/uploads/2018/05/rivertemp2-1.mp4\’ type=\’video/mp4\’>
    Your browser does not support HTML5 video.
    </video>

    <?php
    }

    }

    #576553
    David
    Staff
    Customer Support

    Maybe Tom has another solution but you could consider adding the video in the page header background video and then adding your image as background to the .generate-content-header element. This is where the vide background overlay would normally go.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.