Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Gonna need a link to your site, this will require CSS knowledge.
I don’t have a link because the site has not been published. I know plenty about CSS, just not about PHP.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Do you have google chrome?
Yes I do. That’s what I’ve been using.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Right click on your webpage and select ‘Inspect element’.
In the toolbar that pops up, look at the HTML.
The <body>
element has or should have some unique classes.
Use those unique classes to identify each page and assign a background image to the containing elements.
E.g
.page-id-17 .container {
background: url("/wp-content/themes/yourTheme/et-cetera.png");
}
.page-id-18 .container {
background: url("/wp-content/themes/yourTheme/et-cetera.png");
}
.page-id-19 .container {
background: url("/wp-content/themes/yourTheme/et-cetera.png");
}
I don’t see where any of the classes are any different on the individual pages. The body is class “customize-support” on every page.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Please identify your theme on the WordPress.org theme repository.
It’s a custom theme. I started from original HTML and CSS that had been validated.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
In the file that has the <body>
element, use the body_class function to generate those unique classes.
Okay, thank you. That seemed to work. Then do I do what you said in the earlier post?
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Thanks so much! Worked like a charm :). I’m guessing that if I want to change elements with coordinating colors, I need to use a similar process?
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Yes, using the body class to uniquely identify each page/ post.
Thanks so much! I’ve got it now.