I have a PHP file in Wordpress that has some HTML, "Login & Register" that I would only like to show when a member of the site is not logged in. When they are logged in I would like it to show "Welcome, [name]."
I'm just not sure how to use HTML in a PHP If statement. The condition is this:
<?php
if ( member_is_logged_in() ) {
print "Welcome [name]";
} else {
print "<a href="...">Login</a> | <a href="...">Register</a>";
}
?>
That's how I think it should look, but it's not working. I'm not that great with PHP, but I would appreciate any help. Thanks!
` before it like\"` and this logic also applies to single quotes.