BuddyDev

Search

[Resolved] Working on my site – need some feedback

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #6727

    Hi Joshua,
    Can you please give it a try after updating the redirect url/site id

    
    
    function buddydev_signup_page_redirect() {
    	$redirect_to_url = "https://account.artofwargaming.net/signup"; //please change
    	$account_site_id = 3;//please change
    
    	if ( bp_is_register_page() && ! get_current_blog_id() == $account_site_id ) {
    
    		wp_redirect($redirect_to_url, 301);//permanent redirect
    		exit(0);
    	}
    }
    add_action( 'bp_template_redirect', 'buddydev_signup_page_redirect' );
    
    

    Please do let me know if it works or not?

    Thank you
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 120
    Erich199 on #6732

    Hi Brajesh,
    I dropped that function into bp-custom.php and tried it out. For some reason it’s not redirecting to the account register page. I changed the parameters : my site ID is 2 for the account site and the url is https://account.artofwargaming.net/register

  • Participant
    Level: Enlightened
    Posts: 120
    Erich199 on #6735

    I’m also noticing that for some reason the option ” Logged in users may register new sites.” isn’t working. I only get the register page when I select “User accounts may be registered.” or “Both sites and user accounts can be registered.”. Not sure why this is happening.

  • Participant
    Level: Enlightened
    Posts: 120
    Erich199 on #6736

    So this is my set up:

    define( ‘BP_ENABLE_MULTIBLOG’, true ); in my wp-config file

    Multisite Is Enabled

    The code that you provided me I placed in the bp-custom.php

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #6743

    Hi Joshua,
    I am replicating it on on of my test sites and will get back to you in an hour or so.

    Thank you
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 120
    Erich199 on #6748

    Hi Brajesh,

    Thanks for the help with this. I’ll wait for your response. I think you still have admin on my site if you need it.

  • Participant
    Level: Enlightened
    Posts: 120
    Erich199 on #6833

    Hi Brajesh,

    I’ve got my site all set up. I’ve run into another little snag that maybe you could help me with.

    I’ve set up the domain to pass the “cookieless domain” test on gtmetrix. However; now the problem is I can’t log into any subdomains as it’s requesting cookies.

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #6847

    Hi Joshua,
    I am sorry for the delayed reply. Will try to post in time in future.

    About the cookie less domain, I am not sure about that. It’s something that I haven’t paid any attention but in case of multisite and with BuddyPress, I am not sure if it makes any sense.

    The site will be using cookie(and a lot of them) if BuddyPress is active, so I am not sure if what you are trying to achieve is even a good idea or not?

  • Participant
    Level: Enlightened
    Posts: 120
    Erich199 on #6853

    Hi Brajesh,

    I figured this little problem out by setting

    define("COOKIE_DOMAIN", ""); the downside now is that each subdomain that is defined in multisite is issuing it’s own cookie so single login doesn’t work across the network. I think I can live with it this way as long as it works.

    My GTMetrix score on the site is now “A” and “C” which is way better than out of the box

  • Participant
    Level: Enlightened
    Posts: 120
    Erich199 on #7155

    Hi Brajesh,

    My coder who made the thread prefix plugin made this one for me. He should be pushing it to the wordpress plugin database soon for those who are interested.

You must be logged in to reply to this topic.

This topic is: resolved