Need to redirect default login to advertisement page

WordPress Business Themes Forums Responsive Themes Coupon Theme Need to redirect default login to advertisement page Reply To: Need to redirect default login to advertisement page

Discontinued - The forum content is out of date. For theme support please use our support desk here.

WordPress Business Themes Forums Responsive Themes Coupon Theme Need to redirect default login to advertisement page Reply To: Need to redirect default login to advertisement page

  • Garry
    Garry
    Newbie 11 points

    Hi JamesD

    I have a similar issue

    When a member logs into my live site they are being redirected to https://www.reikihealingassociation.com/wp-admin and they see an error message (Oops! You do not have sufficient permissions to access this page.)

    This is really confusing for them and unless they are smart enough to hit the back button and look to the top left corner of the page and see that they have logged in successfully, they are getting quite frustrated and angry.

    I would like them to be redirected to ideally the my account page or at least the home page

    I have tried adding the code you suggested above, but it doesn’t work, do you have any other suggestions?

    add_action(‘get_header’, ‘ad_preauth_check’);
    function ad_preauth_check() {
    global $post;
    if(isset($post->post_name)) {}
    $slug = $post->post_name;
    if ($slug == ‘my-account’ && !is_user_logged_in()) {
    auth_redirect();
    }
    }

    Appreciate any help to resolve this issue

    Attachments:
    You must be logged in to view attached files.
    October 1, 2018 at 1:04 pm
  • Didn't find what you were after?

    Chat with us now

    or contact our support team