WordPress.org

Ready to get started?Download WordPress

Forums

Remove login page (22 posts)

  1. mark-w
    Member
    Posted 7 years ago #

    Hi,

    When I come to my site, I'm presented with a wordpress login page. Can I remove this - I don't want people to have to register to see my site! I'd like them to just go to the front page, and if they'd like to, register at a later time.

    Thanks,
    Mark

  2. PozHonks
    Member
    Posted 7 years ago #

    A link to your website please !
    Or in your index.php, or sidebar.php, or whatever your themes look like, try to find the following code, and removes it:
    <?php wp_loginout(); ?>

  3. mark-w
    Member
    Posted 7 years ago #

    Hi PozHonks,

    If I remove that from the sidebar, then next time I come to the site I have no option to login or out. Was that the expected result? I really just want to get rid of that prompt page with the wordpress login, that's all. Still I'd like to have the login link on my sidebar.

    Thanks!
    Mark

  4. Doodlebee
    Member
    Posted 7 years ago #

    Can we see a link? It sounds like you are thinking the link to view your blog is actually the link to the admin area. (That's what it sounds like form your description.) Without *seeing* it, there's only guesses.

  5. mark-w
    Member
    Posted 7 years ago #

    Shoot - I think I may have described my problem poorly. It seems I only get this forced login page when I click 'logout' on the meta sidebar.

    At the forced login screen, I can just say 'back to blog' and it lets me back to my site without having to login.

    So I guess non-logged-in users really can view my site ok. But I'd really prefer not having that wordpress login screen if they click 'login' or 'logout' - I'd rather have my own page or a little edit field in the sidebar for them to do that - otherwise they may become disoriented and confused.

    Thanks,
    Mark

  6. Doodlebee
    Member
    Posted 7 years ago #

    >>But I'd really prefer not having that wordpress login screen if they click 'login' or 'logout' - I'd rather have my own page or a little edit field in the sidebar for them to do that - otherwise they may become disoriented and confused.<<

    All that link does is link to your admin page. That's why it asks you to login.

    If you don't want people to click it to log in, then remove the meta area from your sidebar.

    The point of *having* the "login" link is to let you (or other authors) log into your admin area to create posts and such. If you want people to log in directly from your sidebar, then you'll need to 1) remove the meta area from your sidebar, and 2) write your own code so that the login info can be posted directly from your site.

  7. mark-w
    Member
    Posted 7 years ago #

    Hi doodlebee,

    Ok, so the metasection 'login' link is so that I can get to the admin interface from my front page.

    If I remove it, how do I (admin) get back to the interface anymore? I could probably just directly navigate to:

    http://mysite.com/wordpress/wp-admin/

    and it does the same thing yeah?

    Then like you mentioned, to integrate login/register to my site, I create my own link and just stick that portion inside one of my pages or something?

    Thanks,
    Mark

  8. ksd823
    Member
    Posted 7 years ago #

    You might want to look into some widgets that allow you to make the login / logout part of your sidebar. See the Codex list of Widgets. (http://codex.wordpress.org/Plugins/WordPress_Widgets)

    The one I have played with the the King Login, seems to work well.

  9. Doodlebee
    Member
    Posted 7 years ago #

    Ok, so the metasection 'login' link is so that I can get to the admin interface from my front page.

    If I remove it, how do I (admin) get back to the interface anymore? I could probably just directly navigate to:

    http://mysite.com/wordpress/wp-admin/

    and it does the same thing yeah?

    Correctumundo.

    But to create actual login *fields* so you can login from your site's sidebar (rather than a link that takes you to the page) you're going to have to come up with your own coding. Or try a plugin like ksd there mentioned.

  10. mark-w
    Member
    Posted 7 years ago #

    Hmm ok so I found a plugin that puts the login in the sidebar.

    It does about 75% of the job. It handles skipping the wordpress login/out page (so looks like users stay 'in my site' when they're loggin in/out).

    http://template.sfong.net/?p=35

    If I enter the wrong login/username combo I still get redirected to the wordpress login page! I didn't think this would happen after looking at the source code - I'm not too familiar with PHP but from what I can tell the logic for redirecting back to my site after a successful login should be the same as if the login was incorrect:

    [code]
    $return .= "
    <input type='submit' name='submit' title='click' class='button' value='";
    $return .= $button_text."' />";
    $return .= "<input type='hidden' name='redirect_to' value='";
    $return .= $_SERVER['REQUEST_URI']."' /></form>";
    echo $return;
    [/code]

    is there any chance of modifying this?

    Thanks,
    Mark

  11. mark-w
    Member
    Posted 7 years ago #

    Well, I went into wp_login.php and hacked it so that if login fails users just get redirected to my front page instead of having the wordpress login page be generated.

    I wonder if there's any chance of turning this into a plugin, since this type of solution has 1 million things wrong with it.

    Thanks,
    Mark

  12. moshu
    Member
    Posted 7 years ago #

    Why should a simple visitor (= that is not a contributor, author on the blog) should be forced to click on any kind of login - sidebar or not?
    And if the person is a writer of the blog... then they SHOULD learn how to navigate in the admin panel.

    I just don't see the reason for this whole topic.

  13. mark-w
    Member
    Posted 7 years ago #

    Hi moshu,

    I don't want non-posters/commentors to have to login at all - that's the way I have it setup now.

    However for those that want to comment, I do want them to login. But I think they'll be confused when they start off in my theme, then try to login and are presented with a completely different theme on a separate page, which makes it look like they've left the site.

    I've polled my friends and they agree it's just strange to 'leave' the site to login through something called 'wordpress'. I think everyone is just used to logging in through a small ui on a sidebar at most other sites.

    That's really my only motivation behind this, technically there's nothing wrong with the way it's setup and it doesn't bother me, but for my end users I want it to be as smooth as possible.

    As for a plugin, I don't think I'll be able to make one for this since it requires just changing the source in wp_login.php, I have to do some reading on the plugin API.

    Thanks,
    Mark

  14. moshu
    Member
    Posted 7 years ago #

    Forcing to login just for a comment - it's the most annoying thing in the blogosphere. Just my $0.02.

    I never ever comment on a blog if I have to log in, and I am not the only one who thinks like that. But it's your blog.

  15. mark-w
    Member
    Posted 7 years ago #

    Ok given that it might be annoying, I just don't have a choice in the matter!

    I don't think I can write a plugin for this since I directly edited wp_login.php, I just added the following when username/password combo is invalid:

    // Just go back to our front page.
    wp_redirect(get_settings('siteurl'));
    exit;

    I don't know how a plugin could change the logic in the same manner. Anyone know where I can start looking?

    Thanks,
    Mark

  16. Doodlebee
    Member
    Posted 7 years ago #

    Just out of curiosity - *why* are you having everyone login to comment? WordPress is already set up (in your options page) so that first-time commenters have to be approved to comment. people are *required* to leave a name, email address and comment - but it won't show up if they're "new". You moderate and decide if you want the person to be able to leave a comment or not, and WordPress learns from that. From then on, whatever you decided is what happens with the comments - if you allow them to leave comments, then they can (email and name are still required, though). If you don't, they can't. It's already built in that way.

    And yes, what moshu said - if people are logging in just to be able to post as well, then they *should* be familiar with how to do it.

    So I guess my curiosity is piqued, as well - why would you want people to log in to leave a comment in the first place? You say you don't have a choice, but you don't say why. If it's just to reduce spam and that sort of thing, that's what moderating first-time commenting is for, and using plugins like Akismet and Bad Behavior.

    Otherwise, it may help to know *why* you're adamant about having people log in to leave a comment, because a better solution could be proposed.

  17. WillGee
    Member
    Posted 7 years ago #

    mark-w - where in the wp-login.php file did you add that redirect? I'm looking for the exact same thing.

    Thanks!

  18. gatorbrown
    Member
    Posted 7 years ago #

    I moved a widget on my theme and seem to have deleted the login meta on the right side. How do I login otherwise?

    I tried the http://mysite.com/wordpress/wp-admin/ but that doesn't work.

    my site is here
    http://www.customconferencingsolutions.com

  19. moshu
    Member
    Posted 7 years ago #

  20. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

  21. gatorbrown
    Member
    Posted 7 years ago #

    Thanks to Moshu and Otto42 for the help. It got me in and I'm back up. Hooray!

  22. leonid
    Member
    Posted 6 years ago #

    For those of you wondering as to WHY this functionality is needed - here is a scenario: a web site with disabled user registrations, where accounts given away manually. Some content/functionality is restricted only to logged in users.

    Visitors are mostly familiar with the look and feel of the web site that they are browsing. Throwing them somewhere else for login/incorrect password message is very disorienting.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags