• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Background image for Revolution Pro

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Background image for Revolution Pro

This topic is: not resolved

Tagged: background image, customizer, Revolution Pro

  • This topic has 5 replies, 3 voices, and was last updated 2 years, 8 months ago by techiesourav.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • July 1, 2020 at 6:13 am #499783
    Bart van Maanen
    Participant

    Hi all,
    I a trying to get an background image for all pages in Revolution Pro. I tried the css method. Something like this:

    background-image: url("images/patroon.png"); 
        position: center center; 
        background-size: auto; 
        background-repeat: no-repeat; 
        background-attachment: fixed;

    Didn't work.

    Then I tried with the code from WordPress and added it to the Customizer:

    add_theme_support( 'custom-background' );
    
    $defaults = array(
        'default-color'          => '',
        'default-image'          => '',
        'default-repeat'         => 'repeat',
        'default-position-x'     => 'left',
            'default-position-y'     => 'top',
            'default-size'           => 'auto',
        'default-attachment'     => 'scroll',
        'wp-head-callback'       => '_custom_background_cb',
        'admin-head-callback'    => '',
        'admin-preview-callback' => ''
    );
    add_theme_support( 'custom-background', $defaults );

    That did not work either. The picture (png) shows up in the Customizer, but not on the front end.

    So, what do you think could fix it? The site is not live, so I can't provide a link.

    Thanks for any help, Bart

    July 1, 2020 at 6:39 am #499784
    Brad Dalton
    Participant

    What class did you use for the CSS method?

    You should also be able to use the customizer.


    Tutorials for StudioPress Themes.

    July 1, 2020 at 10:32 am #499795
    Bart van Maanen
    Participant

    Hi Brad,
    I used body class.

    July 1, 2020 at 10:19 pm #499826
    Brad Dalton
    Participant

    What's the full CSS rule you used?


    Tutorials for StudioPress Themes.

    July 2, 2020 at 2:27 am #499828
    Bart van Maanen
    Participant

    For a start I took this code from WPBeginner:

    body { 
    background-image: url("http://example.com/wp-content/uploads/2017/03/your-background-image.jpg"); 
    background-position: center center; 
    background-size: cover; 
    background-repeat: no-repeat; 
    background-attachment: fixed;
    }

    And turned it into this for the Revolution css:

    body {
    	/* background-color: #fff; */
    	background-image: url("https://example.com/wp-content/uploads/2017/03/your-background-image.jpg"); 
    	background-position: center center; 
    	background-size: auto; 
    	background-repeat: no-repeat; 
    	background-attachment: fixed;
    	color: #000;
    	font-family: "Open Sans", sans-serif;
    	font-size: 18px;
    	font-weight: 400;
    	line-height: 1.675;
    	margin: 0;
    	overflow-x: hidden;
    }

    Does that help? cover didn't seem to work either,so I tried auto. (Could testing another image help? Allthough it shows up in the Customizer. Probably not.)

    Thanks, Brad

    July 2, 2020 at 6:40 am #499830
    techiesourav
    Member

    i am very much impressed with the bart van i was also stuck something between these


    My top pick tech career review of the month

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble