Tagged: background image, homepage
- This topic has 6 replies, 3 voices, and was last updated 6 years, 3 months ago by Mahesh.
-
AuthorPosts
-
December 12, 2016 at 6:48 pm #105219gargoyle35Participant
Hi;
Is there any way to use background image to use only on homepage?
Thanks.
December 13, 2016 at 9:37 am #105267MaheshKeymaster@gargoyle35: Yes, this can be done with Custom CSS. Where do you actually want to use the background image? Let me know further.
Regards,
MaheshDecember 13, 2016 at 11:39 am #105272gargoyle35ParticipantEspecially on “front page”. If the way you’ll show works I can try for different pages/posts for different background images.
Thanks for your help.
December 13, 2016 at 1:10 pm #105279MaheshKeymaster@gargoyle35: For home page, go to Dashboard=> Appearance=> Customize=> Additional CSS and add the following CSS:
body.home { background-image: url("url-to-image-1"); background-position: center center; background-size: cover; }
For sergi page, add the following CSS:
body.page-id-13 { background-image: url("url-to-image-2"); background-position: center center; background-size: cover; }
Note: Please replace the image url in the above codes (url-to-image-2) with you desired image url.
Regards,
MaheshDecember 13, 2016 at 2:52 pm #105284gargoyle35ParticipantThank you very much for your help.
Best regards ( :
January 4, 2018 at 9:08 am #129115Frej MartinParticipantHi Mahesh
I am not sure if this is the same repeated question or if it is possible at all.
I would like to have a different background image for each page in the primary menu.
So if it is the exact thing you are explaining above, just a little clarification:
Should I change “page-id-13” to the ID of the page where I want a new background image? And where do I see the ID of the page?
And for the background image URL, if I have uploaded it to my media, should I ID it exactly as the image file?
Thank you
January 4, 2018 at 11:44 pm #129174MaheshKeymaster@frej-martin: Please post in your site url. Could you please clarify more.
For page id, please use Catch IDs plugin:
https://wordpress.org/plugins/catch-ids/I don’t get the following line:
And for the background image URL, if I have uploaded it to my media, should I ID it exactly as the image file?Regards,
Mahesh -
AuthorPosts
- The topic ‘Background Image Only on Homepage’ is closed to new replies.