Support » Fixing WordPress » Static Page for non-registered members to log in

  • Resolved ddarienzo

    (@ddarienzo)


    I have a site at http://www.pafr.org that is a members only site for a retailers association. I use the Members Only plug in to direct users who are to logged in to a specific page that I created in php (register.php). It prompts them to either log in, in which case they are directed to wp-login.php page, or to Register, in which case they are directed to a second page that I created in php (register-form.php).
    Since these two pages were not created within the WP framework, I had to copy the style.css to the root directory, link directly to the header image, and basically recode the header and footer – which will all be out of synch when I make a change in the theme.
    So finally to my question, how do I create these pages within WP so I can use get_header(); etc. but not have them appear on the navigation menu bar – which happens when I use the Page -> New option in the admin panel.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You’ll want to create a page template for any custom page you set up.

    The way I manage this, is to take the existing page.php file and make a copy of it. Then I rename it, and the key is to place some php in the top telling WordPress your new page is a template page.

    Place this at the top …

    <?php
    /*
    Template Name: Register
    */
    ?>

    When you create the registration page (from within the Worpdress admin), you will notice in the right sidebar there will be a page attributes section with a template pull down. With the example above you will see an option for Register, select the appropriate template page. (in this case it would be Register)

    For a better understanding see the following pages …

    http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates
    http://codex.wordpress.org/Templates

    … Scott

    Thread Starter ddarienzo

    (@ddarienzo)

    Ah EXACTLY what I needed. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Static Page for non-registered members to log in’ is closed to new replies.