Conditional statement using Custom Fields
-
I have a pretty simple question, but cant for the life of me work it out.
So I have two custom fields.
One is thumbnail_ID_URL1, the other is thumnail_ID_URL2.
Now, when posting, I either use one or the other, never both.
I need to display the thumbnail in the loop.
So I need a statement that is basically…
If custom field thumbnail_ID_URL1 has a value,
<img src=”http://blah.com/<thumbnail_ID_URL1>.jpg>else
If custom field thumbnail_ID_URL2 has a value,
<img src=”http://meh.com/<thumbnail_ID_URL2>.jpg>else
<img src=”http://myurl.com/default.jpg>
—
Any ideas?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Conditional statement using Custom Fields’ is closed to new replies.