Viewing 1 replies (of 1 total)
  • Plugin Author Chad Butler

    (@cbutlerjr)

    If you copy/pasted the example strictly as-is and your page is something other than what is in the example (i.e. “/blog/”), then of course it won’t work. The examples are just examples – they are not “cut-and-paste” code snippets for all cases. They are there to show you an example of how to use it, but the comparison logic you use in your specific application may differ.

    Also, the example makes use of wpmem_current_url() to make the page URL comparison. Make sure you’ve reviewed the documentation for that function as well to make sure you understand how to use it (i.e. if the page the user is coming to has a query string in the URL, the function includes that by default, so you may have set that argument to false. Also, the function adds a trailing slash by default, so if your comparison value does not, you need to consider that in the comparison as well)
    (see: ttps://rocketgeek.com/plugins/wp-members/docs/api-functions/wpmem_current_url/)

    • This reply was modified 5 years, 11 months ago by Chad Butler.
Viewing 1 replies (of 1 total)

The topic ‘Not working “Redirect a specific page to the login page”’ is closed to new replies.