I read this tutorial, here the author names the template custom-register.php and puts it in the theme dir and doesn't explain about how it's loaded by WP, I did the same way but the file didn't loaded on request to the WP signup.

What's the trick here?


Be sure to link that page in your functions page


        <?php cp_show_errors($errors); ?>
       <div class="alert alert"><a class="close" data-dismiss="alert">×</a><strong>Welcome: </strong> 
            <?php _e('Complete the fields below to become a member.', 'cp') ?>

       <div class="alert alert-info"><a class="close" data-dismiss="alert">×</a><strong>Information: </strong> 
            <?php _e('Your password will be mailed to you so use valid email address.', 'cp') ?>
        <div class="row">
<form class="loginform" name="registerform" id="registerform" action="<?php echo site_url('wp-login.php?action=register', 'login_post') ?>" method="post">
        <div class="span4">
      <input class="input-xlarge focused" name="user_login" type="text" id="focusedInput" value="<?php echo attribute_escape(stripslashes($user_login)); ?>"  /> 

        <div class="span4"> 

      <input class="input-xlarge focused" name="user_email" type="email" id="focusedInput" value="<?php echo attribute_escape(stripslashes($user_email)); ?>"  />


         <div class="span4"> 
    <?php do_action('register_form'); ?>
      <input class="btn btn-success" name="wp-submit" value="Send" type="submit" style="height:52px; width:280px;" />

        <?php cp_footer_div() ?>

Should give you an output like http://www.evo3dmovies.com/wp-login.php?action=register

|improve this answer|||||
  • if I directly link to the template, how can I use wp features (like $user_id, wp_create_user(), ...) in the template without loading of wp core? – csstd Apr 17 '13 at 11:14
  • The page you have created you need to link to functions php and let wordpress do the rest. Dont directly link to the page. – Noob Theory Apr 17 '13 at 11:17
  • sorry, i need a little more explanation, You mean functions.php in wp-includes? and how should I link to my page in that file, so on the signup request my page loaded? thanks – csstd Apr 17 '13 at 11:34
  • 1
    No the functions.php in your theme folder. I told you how to link it in the answer above. require_once('custom-register.php'); – Noob Theory Apr 17 '13 at 12:00
  • ok, i didn't know when you request wp-login.php, the functions.php of the theme also loaded, so in functions.php I need to check the action query var for including the 'custom-register.php`? – csstd Apr 17 '13 at 12:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.