• Resolved AiratTop

    (@airathalitov)


    Hi! Thanks for good plugin!

    How can I disable redirect to page /membership-account/membership-levels/ when user login to my site?
    “Theme My Login” plugin looks ugly.

    Can you give me some code to add in my functions.php?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Andrew Lima

    (@andrewza)

    Hi @airathalitov,

    Thank you for the kind words.

    What would you like to achieve when the user logs in?

    PMPro has an add-on called ‘Member Homepages’ which allows you to redirect users with a membership to a specific page according to their membership – https://www.paidmembershipspro.com/add-ons/plus-add-ons/member-homepages/

    I do believe “Theme My Login” (TML) has the ability to redirect users according to their user role, if I’m not mistaken, and you may adjust the URL’s for the user’s role regardless of their level.

    TML inherits the styling from your theme and you may need custom CSS to fine-tune the look of certain pages should you not be happy with it, such as the edit profile page.

    You may need to reach out the TML support team as the styling issue seems to be related to that plugin ??

    I hope this helps.

    • This reply was modified 8 years, 2 months ago by Andrew Lima.
    Thread Starter AiratTop

    (@airathalitov)

    I have a BuddyPress site and I need default redirect settings for all users.

    How can I disable redirect to /membership-account/ page when user which don’t have a membership level (or for all users) login to my site?

    Plugin Author Andrew Lima

    (@andrewza)

    You are able to use Theme My Login redirect options and redirect all users according to their WordPress role (i.e. subscriber, author, editor, admin).

    This will overwrite the default PMPro redirect.

    Here is also a gist I found which you should be able to adjust and redirect users/non-members to a different page – https://gist.github.com/strangerstudios/1332730

    This should solve your problem ??

    • This reply was modified 8 years, 2 months ago by Andrew Lima.
    Thread Starter AiratTop

    (@airathalitov)

    Plugin Author Andrew Lima

    (@andrewza)

    Thank you for the feedback, is nothing happening?

    Have you tried creating a redirect using TML or the other add-on mentioned earlier?

    Thread Starter AiratTop

    (@airathalitov)

    Thank you for the feedback, is nothing happening?

    This function my_template_redirect() redirecting from home page to page /wp-login.php?redirect_to=... (without login)
    I can’t open home page. And when I’m trying to login, still opening page /membership-account/membership-levels/ (you can check it).

    You need to know that for admin everything working good by default. You need test it for simple user.

    Have you tried creating a redirect using TML or the other add-on mentioned earlier?

    TML is changing my “theme friendly” login page to ugly /login (and i can’t delete that page).
    After login I redirected to /login page (despite i changed rules for “simple user” role).

    I’m not sure that plugin is compatible with BuddyPress.

    Can you just say me how i can disable redirect in source code?
    Is this file /wp-content/plugins/paid-memberships-pro/preheaders/account.php ?
    Or can you add that function in PMPro plugin settings?

    • This reply was modified 8 years, 2 months ago by AiratTop.
    Plugin Author Andrew Lima

    (@andrewza)

    Thank you for the clarification and patience.

    You are able to use a filter called pmpro_account_preheaders_redirect and by passing it a value of 0 you disable the redirect.

    Here is a link to the hook for more information – https://www.paidmembershipspro.com/hook/pmpro_account_preheader_redirect/

    Do you need assistance in creating this code?

    Plugin Author Andrew Lima

    (@andrewza)

    Hi @airathalitov,

    I have reached out to the lead developer (Jason) and there is a few possibilities here as we redirect in multiple cases within PMPro and it might be a bit difficult and the PMPro team may need to access and isolate your issue to your website specifically.

    For example you may use this gist to also disable the redirect in a specific case – https://gist.github.com/strangerstudios/98a7d58a81b5becd5d0f#file-pmpro_register_redirect-php

    I would recommend reaching out to the PMPro team to help debug this issue on a more deeper level and post on the members forum in paidmembershipspro.com

    I hope this helps.

    Thread Starter AiratTop

    (@airathalitov)

    Hi, @andrewza!

    This code:
    add_filter('pmpro_account_preheader_redirect', 0);
    or this code:
    add_filter('pmpro_account_preheader_redirect', '0');
    or this code:
    add_filter('pmpro_register_redirect', '__return_false');
    or this code:
    add_filter('pmpro_login_redirect', '__return_false');
    or this code:
    add_filter('pmpro_login_redirect', false);

    is not working.

    • This reply was modified 8 years, 2 months ago by AiratTop.
    Plugin Author Andrew Lima

    (@andrewza)

    Hey @airathalitov,

    Thanks for the update.

    I would recommend in posting to the Member Forum in https://www.paidmembershipspro.com to receive higher level support as this is will need someone to login to your site and assist you with your problem.

    I apologize for the inconvenience caused.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Redirect to levels page’ is closed to new replies.