Create a blog if user not logged in

If a user, that is not logged in, goes to our main site and clicks on one of the links we have about creating a blog or getting a free blog (mysavehereclub.com/blogs/create/) it does nothing but take them to the home page. If the user is logged in, works fine.

So if the user is not logged in (new user) and clicks “Create a blog” shouldn’t WordPress simply take them to the sign-up form page?

This is gotta be an easy fix here. We’re using the Blogs-MU theme. What am I doing wrong here?

Thanks in advance.

  • TerryG
    • Site Builder, Child of Zeus

    Yeah, we like to keep those nosey Brits from spamming our site :slight_smile:. Kidding!

    Sorry, we use a plugin called IQ Block Country which cuts down tons of splogs. My partner got a little carried away and blocked everyone outside of the US. I have set the UK to not be blocked. Try it now.

    Apologies.

  • Philip John
    • DEV MAN’s Apprentice

    Good move, we’re well known for trying to spread spam praising Queenie :wink:

    Okay, I’ve looked at the site – there are two links on the home page to /blogs/create;

    – the the “Support” menu

    – in the banner at the bottom

    You need to change them to point to the registration page (/register)

    For the first you need to edit that in Appearance > Menus

    The second one is more tricky as that appears to be a custom addition – you’ll need to look in your theme files themselves to see where that’s added.

    Phil

  • TerryG
    • Site Builder, Child of Zeus

    OK, after further testing I now have my head on straight and it makes total sense that:

    If logged in:

    /blogs/create – Takes you to the blog creation page

    /register – does nothing because you’re already logged in

    If not logged in:

    /blogs/create – does nothing because you’re not a member and logged in yet

    /register – takes you to the registration page

    I guess here’s how I think it should work (want it to work):

    If logged in:

    /blogs/create – Takes you to the blog creation page

    /register – does nothing because you’re already logged in. Should give the user a note saying that they are already logged in. (not that big of a deal)

    If not logged in:

    /blogs/create – Should automatically take the user to the registration page so they can register and then create a blog. Is there a way to do this?

    /register – takes you to the registration page

    The admin bar handles this by hiding the “login” link when you’re logged in, and hiding the Create a Blog! link (along with everything else) when you’re not logged in. Is there a way to toggle visibility of a regular WordPress menu item like that, checking if a user is logged in or not? If not, maybe have to branch 2 sub menus giving the user both choices?

    Thanks, Phil.

  • Philip John
    • DEV MAN’s Apprentice

    I can’t see an easy way to change a menu item based on log in status.

    However, I’m sure if you’re not logged in /blogs/create should give you something more than a blank page. Do you get the same behaviour with the default BuddyPress theme?

    Phil

  • TerryG
    • Site Builder, Child of Zeus

    Since the default BuddyPress theme doesn’t support the new custom menus there wasn’t a menu link for that. But if I manually typed in the address, it also just goes back to the Home page, as does the behaviour on our Blogs-MU theme.

    I’m thinking it worked differently when I first set those links up but I’m probably dillusional. I think we’ve worked out the logic and what I might need to do here. I’m going to close this issue as resolved.

    I thank you for your help on this matter.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.