Not sure if this would work, co worker shared this with me:
Basically I have the body of several pages loading w/diff background images.
However it gets tricky in wp as to simplify things I’d like to keep a single header.php. the header contains the main <body id=“relative background image”>.
But when the page changes I want it to load the background image for that page Switch to <body id=“new background image”>… So…
this is the original. Don’t want/need button of course
guess it would have to be on each page. the default tag should have to be <body>.
but how can I tell it to get the (for example) style for “techBody” that is in the appropriate stylesheet?
Something that works is to have a class called .techBody as your CSS:
.techBody { ... }
and you can then apply that style name to the element on the page:
$('body').addClass('techBody');
But - why not just use another stylesheet with a specific body class to style it as tech stuff? Then you will be free’d from the scripting side of things.
this is what I have in wp:
several pages whose body background is determined by the body tag.
the header.php that is share by all the pages only has one body tag w/the id of “mainBody”
When the user load a new url I want the body tag to switch to the one for that page.