• Resolved mrcangrejero

    (@mrcangrejero)


    Fourth question in a month. Maybe this one will be the charm.

    I’m trying to run a multisites’ site where any visitor who is not logged in gets to see the login form. That works OK. The problem is that the “Register” link therein doesn’t work.

    I’ve traveled far and away for a solution but, other than those that don’t work, it has been to no avail.

    Any assistance appreciated. Thanks!

Viewing 9 replies - 1 through 9 (of 9 total)
  • What plugin are you using to redirect to the login page?
    It sounds like it’s the settings of it redirecting the registration page to the login page.

    Thread Starter mrcangrejero

    (@mrcangrejero)

    Thanks, MelTech. Actually, I’m using a plugin called “Redirect to login if not logged in”, which I just noticed hasn’t been checked with my version of WP (4.0). Maybe that’s the problem. I disabled it and am checking things again. Will advise.

    Thread Starter mrcangrejero

    (@mrcangrejero)

    With the “Redirect to login if not logged in” plugin disabled, the register links works OK. Guess I’ll have to look for a new plugin or function to force login or registration before accessing the site. Thanks!!!

    In case if you can’t find the right plugin, you can use the following code in your header.php

    <?php
    if (!is_user_logged_in() && !is_front_page()) {
    wp_redirect( ‘https://yoursite.com/wp-login.php&#8217;);
    exit;
    } ?>

    Thread Starter mrcangrejero

    (@mrcangrejero)

    Thanks again, MelTech. Your code works as advertised. BTW, I replaced “!is_front_page” with “!is_home”. Now, the only problem I need to overcome is getting the “Register” link of the login form to work. It brings me back to the Home page. Hope you can help.

    Best to you and yours!!!

    The Register link definitely shouldn’t bring you back to the home page.
    Have you tried to clear your browser’s cache?

    Thread Starter mrcangrejero

    (@mrcangrejero)

    Thanks again, MelTech!

    Unfortunately, clearing the cache didn’t cut it. I’ve tried several plugins and “Register” doesn’t work with them, either. Other than the native “Meta” widget, the best and simplest solution has been yours.

    Really appreciate your help and will keep on trolling. There has to be a solution. If only the people at WordPress would care.

    Take care and the best to you!

    There has to be a conflict somewhere in your WordPress installation. I tried the code in two different WP and both worked.

    Just to troubleshoot I would try the followings, looking at the result each time;
    – disable all the plugins.
    – select a different theme.
    – do a fresh WP installation?

    Good luck,

    Murat

    Thread Starter mrcangrejero

    (@mrcangrejero)

    Might sound boring but, thanks again, MelTech!

    I went for a Salomonic solution, using the code you suggested and displaying a message asking non-registered users to send an email requesting a username and password. It’ll have to do for now.

    In this process I have re-installed WordPress three times, and the problem persists with or without plugins, no matter what the Theme. The “funny” thing is that, if I use the Meta widget, everything works peachy. I’ll just let it slide for now.

    See you in Cyberspace. Thanks!!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Login Page Register Link NOT Working’ is closed to new replies.