• I’ve been searching for a solution to this for well over 2 hours. Since I did not find a solution I am posting this request.

    I am using the built-in page builder included with WordPress (version 5.8.2). I cannot find any way to add a background image for an entire webpage. Nor can I even find a way to set the background color.

    The “Cover” block does not do the job. I need this to be the background image for the entire page and I need it to work as a parallax such that all of the content floats over the background image.

    I can build this very simply by using Elementor plugin. But I am trying to replace this plugin with standard built-in functionality.

    I cannot imagine why this feature is not already included in WordPress. Or if it is, the feature is hidden so well I cannot locate it.
    Thanks in advance for your response.

    • This topic was modified 2 years, 3 months ago by Yui. Reason: moved to fixing wordpress
Viewing 3 replies - 1 through 3 (of 3 total)
  • You can use a background rule on the body like this:
    https://postimg.cc/p9KQnxcF

    body {
        padding-bottom: 0;
        color: #5a5a5a;
        background: #fafafa;
        background-image: url('https://images.pexels.com/photos/956999/milky-way-starry-sky-night-sky-star-956999.jpeg');
    }

    Or, to use on only one single page, you can use a conditional request in your functions file to print the background-image CSS based on the page ID like this:
    https://codex.wordpress.org/Conditional_Tags
    https://wordpress.stackexchange.com/a/252286/49779

    Thread Starter Pete Hahn

    (@dryheat3)

    I appreciate the suggestion. I tried to apply this as well as a few other techniques. The problem with the “background rule” technique is that the individual gutenberg blocks do not have a transparency property so the background image only appears where no blocks are placed. The page you used for an example does not have any blocks, that page was created using the classic editor. And I need a solution that works with the existing Gutenberg elements.

    I have a page with these exact qualities using the Elementor plugin. But I am trying to find a way to build that page using existing tools so I can eliminate that plugin completely.

    The ideal solution (in my view) would be for WordPress to include this as a feature in a new version. The current version of WordPress does not have any tools to work with the document itself (background) and the individual blocks cannot be set to transparent so that the content appears to float over the background. I’m really shocked that this feature does not already exist. Seems to me this would be a fundamental feature to include right from the start. Several years into Gutenberg and they still haven’t managed to get this included? Must be much more difficult than I realize. Or they are trying to avoid displacing all the plugins that do this sort of thing.

    Several years into Gutenberg and they still haven’t managed to get this included? Must be much more difficult than I realize.

    If I am understanding your request correctly, I would say that the exclusion of this feature is bc there is no need for it.

    Features do get get included or not included into software releases based on the feature being difficult or not.

    Thankfully WordPress is a FOSS product, which means you can:

    – create a Feature Request with the community:
    https://core.trac.wordpress.org/newticket
    https://wordpress.org/support/forum/requests-and-feedback/

    Feature Projects Overview

    – extend existing features:
    https://torquemag.io/2017/05/extending-the-wordpress-customizer/

    – or you could hire a developer:
    https://www.codeable.io/developers/plugin-development/

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Set Background Image for individual page’ is closed to new replies.