Thanks in advance for any help.
I am using a highly customised version of Twenty Eleven Wordpress Theme and basically I am trying to add a section into my header.php to appear at the top of all pages. It is to be two things.
1) If you are logged in, display the text "Welcome, USER NAME" 2) If you are logged out, display the text "Login Now >" which will then link to a lightbox or hover of somesort with the login box itself.
I am proficient with HTML/ CSS and a novice but like to experiment with PHP and I thought I had it sussed but it keeps spitting out errors, with the code below I get an error. (Code below, then error follows).
<div id="login">
<!-- Content to be shown if logged in -->
<?php if ( is_user_logged_in() ) ?>
<!-- Display Username / if logged in -->
<p class="logn-text-top">Welcome, <?php echo $current_user->user_login; ?></p>
<!-- Content to be shown if not logged in -->
<?php } else { ?>
<a href="#"><p class="login-text-top">Login Now<span>></span></p></a>
<?php } ?>
</div>
The Error I get is:
*Parse error: syntax error, unexpected '}' in /web_local/docroot/1310/cheshirefitcamps.co.uk/htdocs/wp-content/themes/cheshirefitcamps/header.php on line 107*
I've checked the code over and searched the net but as far as I can see the code is fine.
Any help would be appreciated.
Kind Regards, Tom