Home › Forums › Support › How to set same background image on multiple (but not all) pages with one code This topic has 3 replies, 2 voices, and was last updated 4 years, 10 months ago by Tom. Viewing 4 posts - 1 through 4 (of 4 total) Author Posts June 30, 2019 at 3:39 pm #945570 Roslyn Can I use one piece of code to set the same background image on multiple pages, rather than plugging each one in separately? Here’s the code I’ve been using, but now I’d like to use the same image for background on quite a few more pages: body.page-id-xx { background-image: url(http://IMAGE-URL-HERE); } Thank you for your assistance! June 30, 2019 at 8:12 pm #945645 TomLead Developer Lead Developer Hi there, This is a tough one.. You could add a custom field to each page, and then add a body class to those pages if they have a custom field. I’m not sure it’s worth the time to add the custom field, though? It may be easier to just do this: body.page-id-xx, body.page-id-123, body.page-id-456 { background-image: url(http://IMAGE-URL-HERE); } July 1, 2019 at 5:46 am #945935 Roslyn Yahoo!! That works great! (Oh, what a comma will do!) Thanks very much! July 1, 2019 at 8:52 am #946215 TomLead Developer Lead Developer You’re welcome 🙂 Author Posts Viewing 4 posts - 1 through 4 (of 4 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In