• i have pages that i added to my site and are linked to from wordpress. i would like to know if i can use the login script from wordpress in these pages. i would like these pages to be viewable only by registered members. i dont want to use any htaccess files as that would require people to log in twice. as long as someone is a member i would like the pages to react the same as if they clicked on post.php. so can any of this be done easily? thanks..

Viewing 4 replies - 1 through 4 (of 4 total)
  • Use the cookies… you can take a look at the code in the functions files (under wp-include) for an idea of how to do this.
    Or you can use the view-level plugin with the static page plugin and design around that… you’ll get the same results.

    Thread Starter esgaroth

    (@esgaroth)

    ok so i went through the functions.php file. i guess the function i want to use is get_currentuserinfo. so how do i use the function in my page. im just learning php so i dont know exactly how to do this.

    I’m interested in this solution as well. I added two new menu links across the top of the main post.php page which link to two pages that don’t have anything to do with wordpress other than they’re in the wp-admin folder and I want a logged-in user to have access to them.
    That works fine, but how exactly do I protect these pages? What do I need to include at the top of those pages to allow the already logged-in WordPress user to see them, but to disallow any direct bookmarking? My guess is something along the lines of : require_once(‘admin-header.php’), but that sort of seems like overkill. Thanks to more experienced WordPress/PHP users for suggestions.

    Well, figured it out. The easiest way was to just duplicate edit.php, strip out everything that had to do with editing, leaving just the PHP framework for the page. Then I dropped my own stuff into the ‘wrap’ DIV and everything works just fine.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘authenticate other pages on my site’ is closed to new replies.