Redirecting Login and Signup Pages with s2member

This topic contains 10 replies, has 4 voices, and was last updated by  Guust 8 years, 3 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #117820

    creativologist
    Free User
    Post count: 25

    I have searched posts for the solution with s2member.

    I need login/signup pages to redirect to my s2member login/signup page.

    It WAS working for a short bit, but stopped.

    I have the “permalinks in GD to use the LOGIN PAGE. (tryied setting that to my s2member login page but it didn’t work)

    I put the code in functions.php as explained here:

    https://wpgeodirectory.com/docs/redirecting-the-login-page/

    As I said, it seemed to work for a bit, but it is not working now. I just go to
    /gd-login/ which I do not want.

    Any help is appreciated.

    #117903

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    You should only use the function provided. If you also set the GD-Login page to be the s2member login page, you will create a loop.

    Leave the gd-login selected in GeoDirectory Permalinks and use that function to redirect it to the s2member login page.

    Let us know if this helps.

    Thanks

    #117960

    creativologist
    Free User
    Post count: 25

    Paulo

    In permalinks, it is set to use the standard GD login page.

    http://www.pianowizardacademy.com/campus/certified-teachers

    The “register” should go to

    http://www.pianowizardacademy.com/campus/register (s2member page)

    I have this code in functions.php

    add_filter(‘geodir_login_url’,’change_geodir_login_url’,10,3);
    function change_geodir_login_url($login_url,$args,$gd_page_id){
    //change the url to whatever you want.
    $login_url = ‘http://www.pianowizardacademy.com/campus/registrar’;
    return $login_url;
    }

    But it is still going to GD page.

    #118018

    Guust
    Moderator
    Post count: 29970

    I think you need to redirect to the login page, not the registration page:
    http://www.pianowizardacademy.com/campus/wp-login.php

    There is no GD Register link.

    #118073

    creativologist
    Free User
    Post count: 25

    That’s the problem

    http://www.pianowizardacademy.com/campus/certified-teachers

    on the login box it says “new user, register here.”

    That keeps taking me to the GD Login Page.

    I need it to go to

    http://www.pianowizardacademy.com/campus/registrar

    The functions code I took from another post here, but it doesn’t work with the link I put, or wp-login.php

    #118075

    Guust
    Moderator
    Post count: 29970

    You might be better off to add a s2member login widget?
    https://s2member.com/kb-article/recommended-login-box-widgets/

    #118076

    creativologist
    Free User
    Post count: 25

    I wanted the login box because it shows the dashboard when logged in.

    However, my solution was use my Dynamic Widgets plugin.

    So now, if someone is NOT logged in, they see the s2member login, and once logged in, they see the dashboard.

    Thanks for the help anyway. I have it working this way.

    #118087

    Guust
    Moderator
    Post count: 29970

    Clever solution, thanks for letting us know.

    #118373

    Paolo
    Site Admin
    Post count: 31206

    Yep that was cleaver, another solution would have been to customize the loginbox widget duplicating it’s class in your theme and renaming it. After that you can deregister the original widget and only have your modified version in use.

    Thanks!

    #125596

    Steve
    Full Member
    Post count: 1019
    This reply has been marked as private.
    #125617

    Guust
    Moderator
    Post count: 29970

    Another plugin that allows you to achieve the same thing is https://wordpress.org/plugins/widget-logic/
    You can try the support sections for https://wordpress.org/plugins/dynamic-widgets or widget logic.

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

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

Open Support Ticket