[resolved] Static Page for non-registered members to log in (3 posts)

  1. ddarienzo
    Posted 5 years ago #

    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.

  2. ScottProck
    Posted 5 years ago #

    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 ...

    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 ...


    ... Scott

  3. ddarienzo
    Posted 5 years ago #

    Ah EXACTLY what I needed. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic