I'm designing a new theme and in my page template a have a section where an image is displayed . I would like this image to change depending on which page is loaded.
The section is a DIV like this: <DIV class="ximage"></DIV>
What I would like to do is to add a class to the DIV depending om page loaded and then style the class with background-image in CSS.
I know you can do this with for example body_class() if you want to add classes to BODY. But how do I do this with a DIV?
There will be quite a few pages in this theme, so ceate a template for each page seems wrong.
class="ximage page-<?php the_ID(); ?>"
).