Edit Studio Theme Drop Down Bar

Two questions here!

One - I have installed the "Membership Premium" plugin to add paid memebers functionality to my site. How do I modify the "create a new account" link in the studio drop down panel to go to my membership plugin registration page. I do not want new users to go to the default BP url /register.......

Two - How do I modify the Studio Theme nav bar to show different menus depending on whether someone is logged in or logged out?

Thanks for your help!!

  • Mason
    • DEV MAN’s Sidekick

    Hiya dreamtree,

    Have you read through the membership installation and usage instructions? You should be able to provide a different menu based on each level you create in the Membership plugin. Take a look here for more info:
    https://premium.wpmudev.org/project/membership/installation/

    The signup is a bit different. I think mohanjith has some ideas on this.

    Hope this helps. Let us know if you need anything further!

    Thanks!

  • S H Mohanjith
    • Developer

    1.
    You will have to add the filter 'bp_get_signup_page' and remove bp_core actions for wp and init to achieve what you want. Adding following to studio/functions.php should do the trick.

    add_filter( 'bp_get_signup_page', 'studio_signup_page' );</p>
    <p>if ( bp_core_is_multisite() ) {<br />
            add_action( 'wp', 'studio_wpsignup_redirect' );<br />
            remove_action( 'wp', 'bp_core_wpsignup_redirect' );<br />
    } else {<br />
            add_action( 'init', 'studio_wpsignup_redirect' );<br />
            remove_action( 'init', 'bp_core_wpsignup_redirect' );<br />
    }</p>
    <p>function studio_wpsignup_redirect() {<br />
            $M_options = get_option('membership_options');</p>
    <p>        if ( false === strpos( $_SERVER['SCRIPT_NAME'], 'wp-signup.php') && $_GET['action'] != 'register' )<br />
                    return false;</p>
    <p>        if ( locate_template( array( 'registration/register.php' ), false ) || locate_template( array( 'register.php' ), false ) )<br />
                    wp_redirect( get_permalink($M_options['registration_page']) );<br />
    }</p>
    <p>function studio_signup_page($page) {<br />
             $M_options = get_option('membership_options');<br />
             $page = get_permalink($M_options['registration_page']);<br />
             return $page;<br />
    }

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.