Home › Forums › Back End › if else statements › Re: if else statements
December 11, 2011 at 10:39 am
#92453
Senff
Participant
<< - check for custom field youtube, if there... post it, otherwise post featured image
– check for custom field vimeo, if there… post it, otherwise post featured image >>
Not sure if this is actually what you want. I would think you meant this?
– check for custom field youtube, if there… post it, otherwise:
– check for custom field vimeo, if there… post it, otherwise:
– post featured image
With this structure, you will only get a YouTube video, OR a Vimeo one, OR a featured image (in that order), never two or more of those.
ID, "youtube", true)) { ?>
// code for posting YouTube goes here
ID, "vimeo", true)) { ?>
// code for posting Vimeo goes here
// code for featured image goes here
Just doing it from the top of my head so may not be 100% correct syntax but give it a try and see if that does the trick….?