Easy A
Would you like to react to this message? Create an account in a few clicks or log in to continue.


 
HomeHome  Latest imagesLatest images  SearchSearch  RegisterRegister  Log inLog in  

Share
 

 wordpress log in trouble!

View previous topic View next topic Go down 
AuthorMessage
Zodiac
Member
Member
Zodiac

Posts : 2
Join date : 2011-05-05

wordpress log in trouble! Empty
PostSubject: wordpress log in trouble!   wordpress log in trouble! EmptyWed May 11, 2011 10:40 pm

I'm using wordpress to design a site that allows multiple users to log into the page. The log in is located in the header at the top of the home page. The problem is, after a user enters their log in information and is logged in, the homepage is not showing that they're logged in. Current users have a user level of 7. Here's the code I've used:

<div id="login">
<?php if (!(current_user_can('level_0'))){ ?>
<form action="<?php echo get_option('home'); ?>/wp-login.php" method="post">
<table>
<tr><td>Username</td>
<td>Password</td>
<td></td></tr>
<tr><td><input type="text" name="log" id="log" value="<?php echo wp_specialchars(stripslashes($user_login), 1) ?>" size="20" /></td>
<td><input type="password" name="pwd" id="pwd" size="20" /></td>
<td><input type="submit" name="submit" value="Login" class="button" /></td></tr>
<td><label for="rememberme"><input name="rememberme" id="rememberme" type="checkbox" checked="checked" value="forever" /> Remember me</label></td>
<td></td>
<td></td></tr>
</table>
<input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>" />
</form>
<a href="<?php echo get_option('home'); ?>/wp-login.php?action=register">Register for CHIDSapedia</a> -
<a href="<?php echo get_option('home'); ?>/wp-login.php?action=lostpassword">Recover password</a>
<?php } else { ?>
<h2><?php global $current_user; get_currentuserinfo(); echo $current_user->display_name; ?></h2>
<a href="<?php echo get_option('home'); ?>/wp-login.php?action=logout">Logout</a><br />
<a href="<?php echo get_option('home'); ?>/wp-admin/">User Dashboard</a>
<?php }?>

</div>
Back to top Go down
Axe
Member
Member
avatar

Posts : 13
Join date : 2011-04-08

wordpress log in trouble! Empty
PostSubject: Re: wordpress log in trouble!   wordpress log in trouble! EmptyWed May 11, 2011 10:41 pm

Zodiac wrote:
I'm using wordpress to design a site that allows multiple users to log into the page. The log in is located in the header at the top of the home page. The problem is, after a user enters their log in information and is logged in, the homepage is not showing that they're logged in. Current users have a user level of 7. Here's the code I've used:

<div id="login">
<?php if (!(current_user_can('level_0'))){ ?>
<form action="<?php echo get_option('home'); ?>/wp-login.php" method="post">
<table>
<tr><td>Username</td>
<td>Password</td>
<td></td></tr>
<tr><td><input type="text" name="log" id="log" value="<?php echo wp_specialchars(stripslashes($user_login), 1) ?>" size="20" /></td>
<td><input type="password" name="pwd" id="pwd" size="20" /></td>
<td><input type="submit" name="submit" value="Login" class="button" /></td></tr>
<td><label for="rememberme"><input name="rememberme" id="rememberme" type="checkbox" checked="checked" value="forever" /> Remember me</label></td>
<td></td>
<td></td></tr>
</table>
<input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>" />
</form>
<a href="<?php echo get_option('home'); ?>/wp-login.php?action=register">Register for CHIDSapedia</a> -
<a href="<?php echo get_option('home'); ?>/wp-login.php?action=lostpassword">Recover password</a>
<?php } else { ?>
<h2><?php global $current_user; get_currentuserinfo(); echo $current_user->display_name; ?></h2>
<a href="<?php echo get_option('home'); ?>/wp-login.php?action=logout">Logout</a>

<a href="<?php echo get_option('home'); ?>/wp-admin/">User Dashboard</a>
<?php }?>

</div>

All you should need is this:

Code:

<ul id="(your id)">
      <?php wp_register(); ?>
      <li><?php wp_loginout(); ?></li>
      <?php wp_meta(); ?>
   </ul>

It's alot simpler then it seems. :D
Back to top Go down
 

wordpress log in trouble!

View previous topic View next topic Back to top 
Page 1 of 1

 Similar topics

-
» Trouble with Executables?
» Trouble with anti-viral programs.

Permissions in this forum:You cannot reply to topics in this forum
Easy A :: wordpress log in trouble! Edit-trash Useless :: Trash-