I have a custom author box on my site with a link to the author’s Twitter handle. I am trying to create a conditional statement which only tells the user to follow the author on Twitter only when he/she actually has a handle. Below is the code for this…it’s as you would expect.
Strangely, when I do this, I get the Twitter handle (and only the Twitter handle) from the author’s meta data even when I remove everything between the ‘if’ statement. So, for example, if my Twitter handle is ‘JoeShmo’, when I add this ‘if’ statement I see “JoeShmo Follow Chris on Twitter”. When I get rid of the code between the ‘if’ statement it displays ‘JoeShmo’.