[Resolved] Page Header random video

Home Forums Support [Resolved] Page Header random video

Home Forums Support Page Header random video

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #238378
    Ramona

    Hi Tom!

    Thank you for the PHENOMENAL Themes and GP Premium Plugin. I have seen code you posted to display random logos, and also display random backgrounds in the Header.

    Is there anyway in Page Header to randomly display videos?

    Also, another off-topic question: Do you have an Affiliate Program?

    Thanks,
    Ramona Eid

    #238409
    Tom
    Lead Developer
    Lead Developer

    Ohh, that would be nice, but it’s currently not possible with the page header settings (not to say you couldn’t custom program it). I’ll keep it in mind πŸ™‚

    We do: https://generatepress.com/affiliates/

    Glad you’re enjoying the theme!

    #238441
    Ramona

    Thank you for the link, Tom. Are there any Hooks/Filters for the Video. Not sure where to start.

    Thanks,
    Ramona Eid

    #238491
    Tom
    Lead Developer
    Lead Developer

    Honestly I don’t have a super obvious idea for doing it.

    I assume you would need to use GP Hooks as PHP is required.

    You’ll need to look at how to create HTML5 video backgrounds.

    Then the random part will probably be the same as the images, where you define a number of different URLs (to the videos), and then apply the variable to the HTML5 video background code you find.

    #238505
    Ramona

    OK. Thanks Tom for the guidance. I will investigate that next.

    So far, I have created a Plugin and have enqueued a JavaScript file. I am replacing the src for <source> with jQuery. I am still seeing the original video poster for a second, at least I think it is the poster, so I am going to need to play with that.

    All of that JavaScript code executes when the DOM is ready, so doing Server side code would be optimum.

    I will keep you posted with my progress.

    #238555
    Tom
    Lead Developer
    Lead Developer
    #239390
    Ramona

    Thank you Tom for the suggestion, but I solved it another way. I have it working perfectly on localhost, but now I need to create a DEV site and publish it live.

    I used the Plugin I created exclusively, but I need to port the code to functions.php and clean it up for “public viewing”. I even took it a step further, and am also using JavaScript to keep the randomization going after page load. I have a big project at work for a couple of days, so I will tackle this task this weekend. I can’t wait to share code and the DEV site.

    I wanted to give you and update, so that you didn’t think I forgot about your.

    Thanks for all you do, Tom!

    Ramona Eid
    QueenOfTheWorkaround

    #239411
    Tom
    Lead Developer
    Lead Developer

    That’s awesome! Glad you got it working πŸ™‚

    #241191
    Ramona

    Hi Tom. I have finally gotten a Blog Post completed with the code and and explanation at:
    http://mdwsc.com/random-video-backgrounds/

    The Random Video implementation can be seen at:
    http://mdwsc.com/about/

    Enjoy! And again, thank you for EVERYTHING you do!

    Ramona Eid
    QueenOfTheWorkaround

    #241235
    Tom
    Lead Developer
    Lead Developer

    Beautiful! Thanks for posting it! I’m sure it will be very helpful to people πŸ™‚

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