Unique Header Image for Each Post
-
Hello,
I was hoping someone could help me figure out how to set a unique header image for each post. I’ve seen some solutions on here to do this for categories, but given that they all seem to use if loops, it would get out of control for a site with hundreds of different pages.
I was hoping there would be some way to use Custom Fields to accomplish this – where I could set a post to have a custom field named ‘headerImage’ with a value of ‘foo’, and then the page for that could include a class in the header div of equal to ‘foo’, that way I can just set the images in a stylesheet. Or, even more directly, if I could set the value to ‘foo’ and have the page have <div style=”background-image:url(“img/bg/foo.jpg”>
I really have no idea how to do any of this – I can write in xhtml and css, but haven’t played around with WordPress much, and any handholding would be very appreciated.
Thanks!
- The topic ‘Unique Header Image for Each Post’ is closed to new replies.