Community Forums › Forums › Archived Forums › Design Tips and Tricks › Background image for Revolution Pro
Tagged: background image, customizer, Revolution Pro
- This topic has 5 replies, 3 voices, and was last updated 5 years, 5 months ago by
techiesourav.
-
AuthorPosts
-
July 1, 2020 at 6:13 am #499783
Bart van Maanen
ParticipantHi 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 #499784Brad Dalton
ParticipantWhat class did you use for the CSS method?
You should also be able to use the customizer.
July 1, 2020 at 10:32 am #499795Bart van Maanen
ParticipantHi Brad,
I usedbodyclass.July 1, 2020 at 10:19 pm #499826Brad Dalton
ParticipantJuly 2, 2020 at 2:27 am #499828Bart van Maanen
ParticipantFor 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?
coverdidn't seem to work either,so I triedauto. (Could testing another image help? Allthough it shows up in the Customizer. Probably not.)Thanks, Brad
July 2, 2020 at 6:40 am #499830techiesourav
Memberi am very much impressed with the bart van i was also stuck something between these
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.