• I’m trying to build a registration page similar to that of Gmail’s (as an example). To do this I am attempting to follow the example #2 given in the codex page “Plugin API/Action Reference/register form” but I cannot get it to work.

    I have created a file called “regpager.php” (code below) in my site’s plug-in directory and then activate it via the dashboard but when I access http://mysite.com/wp-login.php?action=register I see no change.

    <?php
    /*
    Plugin Name: Registration Page Changer
    Description: This is just a test plugin.
    Author: Mike B
    Version: 0.1
    Author URI: http://mi.ke/
    */
    
    function my_translate()
    {
       $your_content=ob_get_contents();
       $your_content= preg_replace('/\<label for="user_login"\>(.*?)\<br/',        'Usernumia: ',$content);
       $your_content= preg_replace('/\<label for="user_email"\>(.*?)\<br/',        'Email Sior:',$content);
    
       ob_get_clean();
       echo $your_content;
    }
    add_action( 'register_form', 'my_translate' );
    
    ?>

    Any help you guys are able to offer would be super appreciated 🙂

    Thanks everyone.

Viewing 1 replies (of 1 total)
  • Try adding another hook like the example below.

    function _start(){ ob_start(); }
    add_action( ‘login_init’, ‘_start’ );

    BTW. You might want to check your variables as well 🙂

Viewing 1 replies (of 1 total)
  • The topic ‘Custom Registration Page’ is closed to new replies.