[Resolved] Site-wide background body image/video via PHP or shortcode?

Home Forums Support [Resolved] Site-wide background body image/video via PHP or shortcode?

Home Forums Support Site-wide background body image/video via PHP or shortcode?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #668651
    Michael

    Hi,

    I’d like to use a slider plugin to insert site-wide, full page images and/or videos behind the body content of page. This is as a alternative to Customizer > Background Images > Body.

    With the plugin I’m using, I have the option of inserting PHP code or a shortcode. I’ve read over various threads but I can’t seem to get it working correctly. I can do static images through CSS but can’t see to get it working with the plugin.

    I can get it working through Elements > Hook locations but none seem to stick in the body of page.

    What is the best approach in accomplishing this?

    #668866
    David
    Staff
    Customer Support

    Hi there,

    maybe this plugin is what you are looking for – just use the body class. I haven’t tested it so let me know.

    https://wordpress.org/plugins/video-background/

    #669319
    Michael

    Hi David,

    Thanks for the response, however, let me rephrase the question: where can I insert either PHP code or a shortcode to control the body background?

    #669426
    David
    Staff
    Customer Support

    Hi there,

    the before_header_hook is the first hook inside of the body. I am not sure what or how the plugin works but generally the video element is added to the container and then absolutely positioned to display behind the content.

    This article explains how it is done for the page headers.

    https://docs.generatepress.com/article/page-hero-background-video/

    #671447
    Michael

    Hi David,

    I’m using Smart Slider Pro 3. I added “position: absolute;” but now it seems to cover up the content. I assume I have to further assign the z-index?

    Also, you reference an article regarding page header but there was no link in your post.

    #671460
    David
    Staff
    Customer Support

    Hi there,

    added link above.

    Is this the method you are trying:

    https://smartslider3.helpscoutdocs.com/article/1108-fullpage-slider-into-the-background

    #672083
    Michael

    That worked! Thank-you!

    #672158
    David
    Staff
    Customer Support

    Awesome. Glad i could help

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