Login/404 problems

This topic contains 4 replies, has 3 voices, and was last updated by  thebirdiemachine 10 years, 1 month ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #25262

    thebirdiemachine
    Expired Member
    Post count: 246

    Hi everyone,

    Here is my problem:

    Whenever a user tries to do something that requires them to be Logged In (like add listing/event, to favorite a listing, claim listing) and they are NOT Logged In they get sent to the 404 page instead of to the Log In / Register page.

    Could someone advise me how to change this so users go to the register/login page instead of the 404?

    Thanks & Cheers
    Stacey

    #25263

    Simone
    Expired Member
    Post count: 3515

    Hello Stacey, are you using any redirect plugin in your website?

    Please post your URL and login details (I know you posted it many times 🙂 ), thanks

    #25265

    thebirdiemachine
    Expired Member
    Post count: 246
    This reply has been marked as private.
    #25296

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    given that your login page is yoursite.com/login/, simply change the code you added to redirect.

    From this:

    
    
    
    add_action('init' , 'geodir_redirect_to_default_login') ;
    function geodir_redirect_to_default_login()
    {
    if(isset( $_REQUEST['geodir_signup']))
    {
      wp_redirect(home_url().'/wp-login.php');
      exit();
    }
    }

    To this:

    
    
    add_action('init' , 'geodir_redirect_to_default_login') ;
    function geodir_redirect_to_default_login()
    {
    if(isset( $_REQUEST['geodir_signup']))
    {
      wp_redirect(home_url().'/login/');
      exit();
    }
    }

    Thx and happy holidays to you too!

    #25325

    thebirdiemachine
    Expired Member
    Post count: 246

    Thanks @paolo

    That seems to do the trick!

    Cheers!

Viewing 5 posts - 1 through 5 (of 5 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount