Support » Themes and Templates » Static Text if is_user_logged_in

Static Text if is_user_logged_in

  • Social Connect doesn’t work on my site (except for on wp-login.php) so I removed it from displaying on the comments form and am trying to add a manual <?php if ( is_user_logged_in ) to display Social Connects buttons and redirect to the wp-login page instead. This is the code I am trying to add into comments.php:

    if ( is_user_logged_in() ) {
        echo '';
    } else {
        echo '<div style="font-weight:bold;"><p>Login with:<br /><a href="http://www.ahhelp.me/wp-login.php"><img src="http://www.ahhelp.me/facebook_32.png" /><img src="http://www.ahhelp.me/twitter_32.png" /><img src="http://www.ahhelp.me/google_32.png" /><img src="http://www.ahhelp.me/yahoo_32.png" /></a></div';

    It doesn’t work though for some reason. Firstly, it doesn’t show the buttons and even when I log out, it keeps showing the user that is logged in (admin in this case) but won’t post a comment because the required information is not entered (but doesn’t show required fields). I am guessing it’s because there is a problem with that code… any idea how I can format that code properly? Thanks!

  • The topic ‘Static Text if is_user_logged_in’ is closed to new replies.