Creating A Login Page Within WordPress

Now DAP already provides you with a built-in, out-of-the-box login form, at . But if you want to put this form “within” your WordPress blog, so as to give your login form the same Look & Feel as the rest of your blog, then do this…

1) Create a WordPress Page (not “Post”) with the text %%LOGIN_FORM%% in the body of the page, and a title of say, Login, and save the new page. If you used the text “Login” for the title, then the actual link to this page would be

2) This page now shows up as “Login” along with the rest of your “pages” on your blog.

3) Go to DAP Admin > Setup > Config . Scroll down to the field Login URL

In the text box, enter the full link to your login page from Step 1:

Or if your blog is in the root, then…

That’s it! When someone clicks on the “Login” link that now shows in your “Pages” menu, they will now see a nicely formatted login form.

Related: Where is the Logout Link?


  1. enlightenmental says

    I notice that when a user logs in through DAP, they are not logged into wordpress.

    we have WP users and DAP users linked, so when a user is created through DAP, they are also created as a WP user

    Am i missing something?

    one would assume when the user logs in through DAP, they are also logged in to wordpress

    and when logging out of DAP, they are logged out of wordperss


  2. enlightenmental says


    I see that users created are linked correctly
    and when they login through DAP, they are logged into wordpress

    however, when they logout of DAP, they are still logged into wordpress

  3. enlightenmental says

    I’ve also noticed, when the “admin” DAP user logs in, they have no access to product content, and i am unable to add that product to the admin user…


  4. says


    >>Ive also noticed, when the admin DAP user logs in, they have no access to product content, and i am unable to add that product to the admin user< < That is a deliberate feature, of not giving admin default access to all products, because the first thing you tend to do after protecting a post, is to see if it works. And if the admin can get to it, then they start wondering why the post is not being protected. So it's a feature to protect newbie users from inadvertently thinking that the product doesn't work :-)

    To give admin (or any user) access to a product, go to Users>Manage, check on the checkbox next to the Admin (or that user’s email), then, from dropdown on top-right, select product name to which you want to provide access, and click on “Give selected users access to product”.

    Feel free to open a ticket and we’ll help you figure it out.

    – Ravi Jayagopal

  5. enlightenmental says

    i see that now, thank you

    it looks like it duplicates the user depending on how many products you add to them (which will be confusing for the end admin user) I assumed the user would get additional products listed in the “product name” table row, rather than duplicating the user

    while we’re on the subject, our particular site has three product levels

    – Free
    – Gold
    – Platinum

    platinum has access to platinum, gold and free content

    Im assuming by default, there is no way to have the product “include” other products…

    and if I want the platinum to have access to gold, i will need to add the “gold posts” to the platinum product as well?

    thank you
    (so far DAP is stellar)

  6. enlightenmental says

    Possible Bug:

    When the user logs into DAP, they are logged into wordpress.

    When the user logs out of DAP, they are still logged into wordrpess

    the user needs to be logged out of both

  7. says

    Actually, we haven’t implemented the “universal logout” feature yet.

    It’s low on our priority list, but we’ll get there sooner than later.

    Thanks for the feedback!

    – Ravi Jayagopal

  8. EnlightenMental says

    hey Ravi,

    random question for you,
    I have another project I’m starting, but this is a WPMU + Buddypress install

    I’m going to assume DAP has not been tested on WPMU using the buddypress plugin

    does it work?

    if not, how much to get DAP working with WPMU + Buddypress

    please feel free to email me


  9. says

    Anyone successfully install a dap horizontal login/logout in the header are of WordPress?

    I tried, and I can log into my DAP dashboard, but can’t access the material. I embedded the script and form code from the DAP login into the header.php file. It doesn’t look right yet, but I’d love any thoughts on how to make this work.

    site: (still under construction)


  10. says

    I want to apply CSS to the login form or at least customize the login.php. So I edited the in dap/inc/content but my changes don’t show up.

    Am I editing the wrong code?

  11. Paul says

    How to I lock the whole WordPress site?

    I don’t want people seeing the sidebars etc..

  12. says

    If you protect every single post on your blog, then it will redirect your non-logged-in visitors to the URL that you have set in Config > Advanced that says “URL where users will be redirected to if there are no posts available for display”.

    – Ravi Jayagopal

  13. Raygun says

    On login redirection for administrator, is there a way to redirect them like a normal users? Example, redirect ALL users to blog homepage.

  14. says


    The dap login redirection only applies to non-admin users. If you want to test login redirects, pls create a test user (via dap admin -> add users page) and login as that user to test the user experience.

    DAP admin users are always redirected to the dap admin dashboard upon login.

  15. Joe Colgan says

    I created a login page using the login shortcode on the dap login page in OptimizePress, and now whenever I try to view that page I am taken to the DAP Admin Home page. I am no longer able to view the login page.

  16. says


    >> I created a login page using the login shortcode on the dap login page in OptimizePress, and now whenever I try to view that page I am taken to the DAP Admin Home page. I am no longer able to view the login page. < < If you are logged in to WP admin, then you will be automatically logged-in to DAP as admin (unless you turn off that option in dap setup -> config -> WordPress related section). If you are logged in to dap as admin and visit the page with the login shortcode (%%LOGIN_FORM%%), you will get redirected to admin panel. To test, please use a browser where you are not logged in to dap as admin.


  17. Philip Kahn says

    I’ve been unable to find this documented — is there a function to test if a user is logged in? I’m picturing this:


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>