- This topic has 9 replies, 2 voices, and was last updated 5 years, 11 months ago by
Leo.
-
AuthorPosts
-
October 24, 2019 at 2:10 am #1043063
Makan
Hi,
I actually need to add different full background image to each page of my website.
I used customize>background image>body to assign a background image to my website. It works, but I need to change the background image for each page.Thanks,
October 24, 2019 at 5:25 am #1043198David
StaffCustomer SupportHi there,
how many pages are we dealing with ?
And is the image just a standard attachment or is it the Featured Image for the page?October 24, 2019 at 12:33 pm #1043711Makan
Hi,
Thanks for the answer.It is not a lot actually. Maybe 10 pages! and they are standard attachment,
October 24, 2019 at 12:47 pm #1043723Leo
StaffCustomer SupportYou’d need to write a block of CSS for each page:
body.page-id-xxx { background-image: url(https://IMAGE-URL-HERE); } body.page-id-xxxxx { background-image: url(https://IMAGE-URL-HERE); }Adding CSS: https://docs.generatepress.com/article/adding-css/
Let me know if this helps 🙂
October 25, 2019 at 11:56 pm #1044793Makan
Thank You so much.
It works for the pages.and I have another question.If I want to assign two different background images for each page, one for desktop version and one for mobile version, how should I edit the following code?
body.page-id-xxx {
background-image: url(https://IMAGE-URL-HERE);
}October 26, 2019 at 8:52 am #1045274David
StaffCustomer SupportHi there,
apply your backgrounds like so:
/* Desktop Images */ @media(min-width: 769px) { body.page-id-xxx { background-image: url(https://IMAGE-URL-HERE); } body.page-id-xxxxx { background-image: url(https://IMAGE-URL-HERE); } } /* Mobile Images */ @media(max-width: 768px) { body.page-id-xxx { background-image: url(https://IMAGE-URL-HERE); } body.page-id-xxxxx { background-image: url(https://IMAGE-URL-HERE); } }October 28, 2019 at 10:57 pm #1047432Makan
Thanks for the awesome support.
It works.October 29, 2019 at 3:38 am #1047565David
StaffCustomer SupportYou’re welcome
June 24, 2020 at 11:54 am #1340624mikimunoz@hotmail.com
Hello,
This contribution has also been great for me.
Would it be possible instead of an image, to set a slider as background?Thanks in advance
Miki Muñoz
June 24, 2020 at 2:35 pm #1340745Leo
StaffCustomer SupportAny chance you can open a new topic for your question?
Thanks 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.