WordPress.org

Ready to get started?Download WordPress

Forums

If user is logged in problem (2 posts)

  1. jonte2020
    Member
    Posted 1 year ago #

    Hi!

    I'm creating a site using the Phenomenon wordpress template. The creator gently integrated a login function to the theme. The problem is that once I tick "enable login function", the loginbox does not disappear (endless loop of "login, login, login etc". So I added this to the "header.php":

    <!-- If User Is Logged In Display This -->
    	<?php if ( is_user_logged_in() ) { ?>
    <div align="right">
    <div style="margin-top: -40px">
    <b><FONT COLOR="#FFFFF">Välkommen
    <u><?php
    global $current_user;
    if ( isset($current_user) ) {
        echo $current_user->user_login;
    }
    ?>
    </FONT></b></u><strong><?php echo $user_identity ?></strong>
    	<form name="loginform" id="loginform" action="<?php echo wp_logout_url(); ?>" method="post">
    	<input type="submit" name="wp-submit" id="wp-submit" value="Logga ut" />
    	<a href="http://www.onlinestudier.com/din-profil"><FONT COLOR="#FFFFF">Ändra din profil</FONT></a>
    	<input type="hidden" name="redirect_to" value="<?php bloginfo('url'); ?>" />
    </div>
    </div>
    <!-- If User Is NOT Logged In Display This -->
    <? } else { ?>
          <div id="login-holder"> <a href="#login-box" class="sml-btn special">Logga in</a> </div>
          <?php } ?>

    where the original only was like this:

    `<?php
    $Display_Login = get_option('pheno_login_display');
    if ($Display_Login == true) {
    ?>
    <div id="login-holder"> <a href="#login-box" class="sml-btn green">Login</a> </div>
    <?php } ?>`

    Everything now looks as I want it (the text is in Swedish btw), but once I enter a page on my website, it is compressed to the left and looks completely weird.

    Kind of noob on this, would really appreciate help since I've been stuck for hours...

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    I'm sorry but as you are using a commercial theme, you need to seek support from the theme's vendors.
    http://themeforest.net/user/Bluz

Topic Closed

This topic has been closed to new replies.

About this Topic