• Resolved Designbully

    (@designbully)


    Hi great plugin. It tried to get access to lost password page but can’t get it to work but i can get access to another page, kopvilkor. Any sugestions how to get it to work. Running wp 4.2.2 and woocommerce
    url: http://www.thebrandconceptwebshop.se/demo1/wp-login.php
    /**
    * Filter Force Login to allow exceptions for specific URLs.
    *
    * @return array An array of URLs. Must be absolute.
    **/
    function my_forcelogin_whitelist() {
    return array(
    site_url( ‘/index.php/my-account/lost-password/’ ),
    site_url(‘/index.php/kopvilkor/’)
    );
    }
    add_filter(‘v_forcelogin_whitelist’, ‘my_forcelogin_whitelist’, 10, 1);

    https://wordpress.org/plugins/wp-force-login/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Kevin Vess

    (@kevinvess)

    Hmm.. have you tried whitelisting those pages without the index.php/ part of the path?

    /**
     * Filter Force Login to allow exceptions for specific URLs.
     *
     * @return array An array of URLs. Must be absolute.
     **/
    function my_forcelogin_whitelist() {
      return array(
        site_url( '/my-account/lost-password/' ),
        site_url( '/kopvilkor/' )
      );
    }
    add_filter('v_forcelogin_whitelist', 'my_forcelogin_whitelist', 10, 1);

    Do those URLs work normally when the plugin is deactivated?

    Plugin Author Kevin Vess

    (@kevinvess)

    It looks like you were able to get it working; I’m marking this topic as resolved.

    After checking your site again, it looks like your lost password page was using a different URL than the ones you originally whitelisted. I assume you got it working by whitelisting your URL: /demo1/index.php/my-account-2/.

    Feel free to post your solution if it was different. Thanks and enjoy the plugin!

    Thread Starter Designbully

    (@designbully)

    yes that was right i just tried to copy the link from the loginbox but after disabling the plug in i saw the url that i was landing on… tahnkas for your time

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘exceptions for certain page’ is closed to new replies.