Change background image based on custom field?
-
Hi,
I have custom fields set up for each of the 250 posts on my site, which displays the Album name for that post.
You can see an example here: https://www.pinkfloydtabs.com/see-emily-play-guitar-chords
The custom field & displayed album for this particular post is “Relics”.
So I’d like to set something up so where I can tell WordPress that:
If custom field = “Relics”, then display “Relics.jpg” as the background image for that post.
And so on for the various different albums. There’s 15 different unique albums/background images in total.
Does anyone know how to go about doing this?
Or would it maybe be easier to put each post in it’s own wordpress category based on the album – then tell wordpress: “If category = this, then display this background”?
I imagine there’s a number of way’s to do this, just looking for a little guidance. ??
- The topic ‘Change background image based on custom field?’ is closed to new replies.