<?php if ( is_user_logged_in() ) {
echo '<a href="/community"><img id="visit-the-forums" src="<?php bloginfo('template_url') ?>/images/visit-the-forums.png" alt="Check out the Forums!" /></a>'
} else {
echo '<a href="/community"><img id="join-the-forums" src="<?php bloginfo('template_url') ?>/images/join-the-forums.png" alt="Join the Forums!" /></a>'
}
?>
I think there is something wrong w/ the way I set up the “php bloginfo” code inside but I’m not sure how to fix it.
The code below should work for you. You had to make use of string concatenation: