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

  • Garry
    October 1, 2018 at 1:04 pm

    Hi JamesD

    I have a similar issue

    When a member logs into my live site they are being redirected to 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()) {

    Appreciate any help to resolve this issue

    You must be logged in to view attached files.
  • Copyright © 2010-2020 PremiumPress Limited.

    secure payments