• Resolved onlineipi

    (@onlineipi)


    Hi There,
    Thank you for the free plugin.

    I restricted posts on my website where the user is prompted to register/login. Once the user has logged in and gone back to that particular post, it again shows the same prompt asking him to login again. But if I refresh the page, content is visible.

    To explain it better,
    Let’s say I have two posts A and B on the website and both of them are partially restricted and require the user to log in.
    1. Person goes to post A, he is prompted to log in
    2. user login and then go back to post A, He is again prompted to log in.
    3. user go to post B, he can view it
    4. user come back to post A, again prompted to log in.
    5. user refresh the page, he can view the content.

    Why am I needed to refresh the page even after login, to view the content?
    Can you please provide a fix?

    Thank you!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Do you have any caching plugins enabled? If so, does deactivating those resolve the issue?

    Thread Starter onlineipi

    (@onlineipi)

    I have no caching plugin installed.
    I have following plugins only:
    Adrotate
    Aksimet
    contactform
    google no captcha
    heartbeat control
    motopress content editor
    restrict content
    simple custom post order
    sucuri security
    ultimate member
    wordfence security
    wordpress imported
    yoast SEO

    Is there any other input that I can provide!

    This sounds like a browser caching issue. Is the user navigating back with the back button? Also, which method are you using to log in?

    Thread Starter onlineipi

    (@onlineipi)

    I am using forms provided by ultimate Member plugin and user is navigating through links.
    Somehow the home page cannot contemplate that user is logged in until I refresh the page, for all other posts or pages, it works fine after login

    Thread Starter onlineipi

    (@onlineipi)

    I am using this code
    add_filter(‘wp_nav_menu_items’, ‘add_login_logout_link’, 10, 2); function add_login_logout_link($items, $args) { ob_start(); wp_loginout(‘index.php’); $loginoutlink = ob_get_contents(); ob_end_clean(); $items .= ‘

    • ‘. $loginoutlink .’
    • ‘; return $items; }

      to get a prompt login/logout button

      and even after logging in; home page shows login instead of log out!

    That code is unrelated to Restrict Content, and we don’t support Ultimate Member. Sorry.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Need to refresh the page’ is closed to new replies.