Site logo

Archived topic

Add background image thanks to an element / hook

3 replies · Started by Gerva on April 8, 2022

Viewing posts 1–4 of 4

Morning everyone and congratulations to GeneretorPress.
I am using thema Broadcast from the library.
I set a blog page as archive instead of home as default.

Now I would like to add a background image on the whole page and consequently also under the different posts.

Is there a way through the use of an element / hook to do this?

I don't have an example page because the site is local, but if needed I'll install one later.

Thanks

Hi there,

to add a background image behind the content of just the blog page will require some CSS like this. Add this to your Customizer > Additional CSS ( or Child Theme style.css ):

.blog {
    background-image: url('the_full_url_to_your_image/image.jpg');
    background-size: cover;
    background-repeat: no-repeat;
}

Replace the the_full_url_to_your_image/image.jpg with the URL of the image you want displayed. Which you can get from the Media Library.

Great thanks
You've enlightened me on an issue I hadn't noticed ... the fact that there is a .blog class for that specific page ...
Thank you very much indeed.

Glad to be of help!

This archived topic is closed to new replies.