I am trying to add conditionals for authorship to show for posts on a specific author id. Would appreciate if someone could give the following a quick look over

<?php if is_author ('2') AND ( is_single() ) {?>
<link rel="author" href="https://plus.google.com/**********"/>
<?php }?>
  • What is the exact problem you are facing? – kaiser Apr 25 '14 at 8:23
  • I was just after a quick code audit which has been taken care of, thanks anyway kaiser – user50812 Apr 26 '14 at 8:54
  • The posted (and accepted) answer is in no way different to your questions code. && and AND are exactly equal in that statement. – kaiser Apr 26 '14 at 22:52
  • I use AND but when it comes to conditionals I only have XF as a reference, the response posted helped confirm I was on the correct track and it does differ from mine slightly, cheers for confirming that AND is acceptable – user50812 Apr 28 '14 at 4:40

This post is related to php so you should post it in stackoverflow but as you are a new user .i would help you

<?php if (is_author('2') && (is_single()) ) { ?>
<link rel="author" href="https://plus.google.com/**********"/>
<?php } ?>
|improve this answer|||||
  • Thank you for the help and I will post appropriately next time – user50812 Apr 25 '14 at 9:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.