WordPress.org

Ready to get started?Download WordPress

Forums

individual MU Registration Page possible? (7 posts)

  1. cyprus_di_minda
    Member
    Posted 3 years ago #

    I run WP as MU and changed my Theme on the MainBlog.
    My Problem is I´ve got a startpage with a big header Image. And subthemes with much smaler header background. The registration page seem to use the start side by default. Can I change this or is it possible to make individual registration page? I´ll be happy for every hint.

    Thanx cy

  2. David Sader
    Member
    Posted 3 years ago #

    Registration must be handled by the MainBlog. But it can be duped using template files in your theme.

    Here's basically what I did to create my own signup page
    Create a page template in your MainBlog theme dir.

    <?php
    /*
    Template Name: Signup
    */
    //the rest is for the most part a copy'n paste of wp-signup.php
    // require( dirname(__FILE__) . '/wp-load.php' ); becomes require( ABSPATH . '/wp-load.php' );
    // get_header();  // or copy the contents of header.php here and tinker so the signup gets a different header than the rest
    // action="wp-signup.php" becomes action="/signup/"
    ?>
    <?php get_sidebar(); ?> // I wanted the sidebars on the signup page
    <?php get_footer(); ?>
    ?>

    Create a new page for your Mainblog, title it Signup and apply the new page template to it.

    Finally add the following to your mu-plugins dir to redirect requests for the old wp-signup:

    function ds_my_signup_page() {
    	$page = 'http://myblog.network.tld/signup/';
    	return $page;
    }
    add_filter( 'wp_signup_location', 'ds_my_signup_page' );
    
    if( strpos($_SERVER['REQUEST_URI'], 'wp-signup.php'))
    wp_redirect('signup/');

    I suppose you would also have to remove the following from the signup page template (and edit the action urls to point at a subblog/signup/) thus allowing you to handle registrations from a blog other than the main blog but I haven't done that in my install.

    if ( !is_main_site() ) {
    	wp_redirect( network_home_url( 'signup/' ) );
    	die();
    }
  3. the registration page uses the theme on the main site, yes.

  4. cyprus_di_minda
    Member
    Posted 3 years ago #

    I´m still trying to set up another page as a sign up page. But did not succeed at least. To Andrea_r the answer is YES.

    Thanks for every answer till now.

  5. Yes, you can also use a page template to make a signup page, and /or add some styling to your theme to use the classes spit out by the signup page.

    But it's still on the main blog. ;)

  6. cyprus_di_minda
    Member
    Posted 3 years ago #

    Okay I´m still fighting with this topic.
    Let me describe what I did do and maybe I can help other soulmates with an solution.
    First I tried the solution David gave me in this post.
    If I use this code

    function ds_my_signup_page() {
    	$page = 'http://mydomain/signup/';
    	return $page;
    }
    add_filter( 'wp_signup_location', 'ds_my_signup_page' );
    
    if( strpos($_SERVER['REQUEST_URI'], 'wp-signup.php'))
    wp_redirect('signup/');

    I get an Error

    The Errormessage is
    function ds_my_signup_page() { $page = 'http://mydomain/signup/'; return $page; } add_filter( 'wp_signup_location', 'ds_my_signup_page' ); if( strpos($_SERVER['REQUEST_URI'], 'wp-signup.php')) wp_redirect('signup/');

    If I don´t use it and link direkt to http://mydomain/signup/ it works fine.
    But I´m not shure whether it is is a mistake to do it so.
    @Dave Please give me your suggestion.

    Then I tried this Tutorial

    And got this notice: "Parse error: syntax error, unexpected '/' in /var/www/web2/html/wp-content/themes/TheTheme_3.0/wp-signup.php on line 15"

    Line 15 is the line where I had to change the path:
    require( dirname(__FILE__) . ‘/wp-load.php’ );
    to
    require( ‘../../../wp-load.php’ );
    I tried require( ‘../../wp-load.php’ ); and require( ‘./wp-load.php’ );
    and every possibitity in between. With no success.

    Many thanks for your help

    cyprus

  7. oriste
    Member
    Posted 3 years ago #

    If you just want the default signup form displayed in one of your pages, put a simple redirect at the end of your .htaccess file, like:
    Redirect 302 /sign-up/ http://domain.tld/wp-signup.php
    where /sign-up/ is a page that you created yourself and for which you can set the template to be used in the normal way. Use redirect 301 or 302 as you prefer.

Topic Closed

This topic has been closed to new replies.

About this Topic