8 replies
  • WEB DESIGN
  • |
Hello warriors. Can anybody tell me how I can create a login/logout page that is connected to my main website url. For example, when people would click to visit my website it would take them to a login page where they would have to insert username and password before actually getting to the real homepage. I am just looking for something simple because I will only have one username and one password that I will be giving to everybody.

it's for a wordpress site that I am working on but I have not found a decent plugin that does this. Any ideas???

I do have some experience in coding and working with html, so i'm not totally green about this stuff. Any help would be greatly appreciated on this issue.

Also I am looking for a good events calendar plugin that I can insert into a wordpress page, not as a sidebar widget. Then again did not find anything that was functional enough for me.

Any help would be greatly appreciated.
#create #login #page
  • Profile picture of the author David V
    There are many plugins to do this, but they really are overkill.
    Here is a very simple gist you can use.
    It is a plugin.
    Save the gist to a plain text file, name it whatever you like and add as the extension .php (my-new-plugin.php)
    Place this inside a folder named the plugin name.
    Upload to site and activate. All non logged in users will be directed to the login page.
    It's about as simple as you can get.
    Here's another snippet to do the same thing.
    {{ DiscussionBoard.errors[7642357].message }}
    • Profile picture of the author Eric Huard
      I followed instructions as explained and tried both suggestions, but it did not work. Nevertheless, I appreciate your response. Have a nice day!
      {{ DiscussionBoard.errors[7642524].message }}
      • Profile picture of the author David V
        Originally Posted by Eric Huard View Post

        I followed instructions as explained and tried both suggestions, but it did not work. Nevertheless, I appreciate your response. Have a nice day!
        Are you sure you saved/setup that plugin gist correctly, it definitely works..(tested in WP v3.5)

        I put it into a plugin for you, try again...I just checked, worked fine. See attachment.
        {{ DiscussionBoard.errors[7642565].message }}
        • Profile picture of the author Eric Huard
          Thanks for the plugin. Yes indeed it works fine, I must have been doing something wrong. But I think you misunderstood my question. I do not want a login redirect for my wordpress admin panel, but a login page that leads directly into my homepage.

          Here is an example of what I want: http://helenadebruyn.com/ and once you get to this page I want the people to login to have access to the whole website including the homepage. The username and password would be the same for everybody. Thanks for all your help and time...
          {{ DiscussionBoard.errors[7643001].message }}
          • Profile picture of the author David V
            Originally Posted by Eric Huard View Post

            I do not want a login redirect for my wordpress admin panel, but a login page that leads directly into my homepage.
            Just to clarify, what you see in the example site you gave is actually the same thing. It's not just an admin login. Authors, contributors, subscribers, and other roles can login there as well. How it appears, or integration of the login page is a little different.

            It seems different because they integrated the login form into a site page.
            I did the same thing to a clients site awhile ago, I integrated the login to appear to be part of the site.

            What you need to do is create a page called "whatever you want" and integrate the login form on the page. There are many free WP plugins that do this.

            This will give you the appearance you need.

            You can also just hide the top menu bar by default for users on the front end of the site.
            Hopefully this clears it up a little.

            ADDED: I'm going to give you something to do this, but I have a meeting in 15min, so when I come back......
            {{ DiscussionBoard.errors[7643394].message }}
            • Profile picture of the author Eric Huard
              Ok i'll wait to receive it. Thank you for everything so far, your generous time is greatly appreciated...
              {{ DiscussionBoard.errors[7643769].message }}
  • Profile picture of the author David V
    Ok, I just did a quick scan and I haven't updated my plugin to WPv3.5 yet (it's a private plugin not released anywhere so I was really in no rush) so, rather then having to do that right now, I'll point you toward a plugin that will do what you need.
    The wp-members plugin will work fine.

    Make sure to go through the option settings and turn off registration and a few other things globally (all pages/posts sitewide) and then logout.

    You'll see that you can't view anything without logging in and a login form will be embedded on the page.
    This can be adjusted on a per post per page basis if you want so you could show some pages/posts.

    Be sure to adjust the messages to the non-logged in visitor as well.
    Hope that helps, and it's been updated to WP v3.5
    {{ DiscussionBoard.errors[7643877].message }}
    • Profile picture of the author Eric Huard
      Thank you David i'll try that...
      {{ DiscussionBoard.errors[7644161].message }}

Trending Topics