WordPress.org

Forums

Missing Login/Registration section in my theme (4 posts)

  1. shpanky
    Member
    Posted 10 years ago #

    I set my setting in my wp-admin so that anyone can register, but they must register and login before they can post comments. But for some reason, this won't work on my site http://www.adamschwenk.com. When a user clicks on "comments" they are given some sections to fill in and when they try to post it just tells them they must be logged in to post a comment, but there's no form anywhere for them to login and register. Anyone have any idea what the problem may be? Thank you!

  2. Jennifer Ledbetter Clay
    Member
    Posted 10 years ago #

    You need to add the following code somewhere in your sidebar.php

      <?php wp_register(); ?>

    • <?php wp_loginout(); ?>
  3. shpanky
    Member
    Posted 10 years ago #

    That doesn't really help. I like the interface on this site for registering and logging in, and I would love to implement this in my own site. You guys have any ideas where I can pull this code from? Thanks.

  4. Tenshi
    Member
    Posted 9 years ago #

    I also need a login area for my users. The PHP tags you supplied were okay, but I think what shpanky and I are looking for is a more conventional way to input a login/pass - something more akin to what you find at a forum... input boxes for their user/pass and then a button that will simply log them in without trying to redirect them to the admin page.

    Does anyone have a code like this? I will continue to search the site. (Preliminary searches turned up nothing.)

    -----------------edit--------------------

    Wow. Not too bad for a WP n00b.

    Here, Shpanky. Try this.

    <div id="login">

    <h1>WordPress</h1>
    <h2>Register for this blog</h2>

    <form method="post" action="wp-register.php" id="registerform">
    <input type="hidden" name="action" value="register" />
    <label for="user_login">Username:</label>
    <input type="text" name="user_login" id="user_login" size="20" maxlength="20" />
    <label for="user_email">E-mail:</label>
    <input type="text" name="user_email" id="user_email" size="25" maxlength="100" />
    A password will be emailed to you.

    <p class="submit"><input type="submit" value="Register »" id="submit" name="submit" />
    </form>

    </div>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.