Title: Dynamic URL &#8211; Example
Last modified: March 25, 2017

---

# Dynamic URL – Example

 *  Resolved [manu2404](https://wordpress.org/support/users/manu2404/)
 * (@manu2404)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/dynamic-url-example/)
 * Hey there! How is it going?
 * First, thank you so much for this plugin and for making it free, we really appreciate
   it.
 * I would like to get a code example to whitelist some dynamic urls.
 * Let’s say the domain I want to whitelist is
    `xxxxxxx.com/unirse/?level=1`
 * What of the 3-4 code options would be the best and what do I have to change on
   them? Could you change it and make an example of how it would look applied to
   that URL?
 * Thank you so much!
 * Best,
    Manu

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

 *  Plugin Author [Kevin Vess](https://wordpress.org/support/users/kevinvess/)
 * (@kevinvess)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/dynamic-url-example/#post-8956802)
 * Thanks for using Force Login! I’m glad you like it.
 * To decided which method of whitelisting your dynamic URLs, I’d need to know more
   specifics.
 * For example, if you want to whitelist the `x.com/unirse/` URL regardless of the
   query string `?anything=whatever` or none – I would suggest [Method 1](https://github.com/kevinvess/wp-force-login/wiki/Whitelist-Dynamic-URLs#method-1---page-url-regardless-of-query-string).
 * If you want to whitelist only that exact URL, including the query string, then
   I would recommend this:
 *     ```
       /**
        * Filter Force Login to allow exceptions for specific URLs.
        *
        * @return array An array of URLs. Must be absolute.
        */
       function my_forcelogin_whitelist( $whitelist ) {
         // list of single page URLs
         $whitelist[] = site_url( '/unirse/?level=1' );
   
         return $whitelist;
       }
       add_filter('v_forcelogin_whitelist', 'my_forcelogin_whitelist', 10, 1);
       ```
   
 * Lastly, if you’re asking to whitelist **any page URL** that has the query string
   parameter of `?level` applied to it, or that specifically equals `1` – `?level
   =1` – I would recommend [Method 3](https://github.com/kevinvess/wp-force-login/wiki/Whitelist-Dynamic-URLs#method-3---page-url-based-on-query-string-parameters-andor-values).
 * Just change the example URLs to match your pages, parameters, and/or values to
   whitelist any URLs or combination of URLs you need.
 *  Thread Starter [manu2404](https://wordpress.org/support/users/manu2404/)
 * (@manu2404)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/dynamic-url-example/#post-8956881)
 * Hey there Kevin, you’re amazing!
 * Thanks for the example, I understood it and it worked perfectly. Also, thank 
   you for the quick answer!
 * Keep working on this
 * Best,
 *  Plugin Author [Kevin Vess](https://wordpress.org/support/users/kevinvess/)
 * (@kevinvess)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/dynamic-url-example/#post-8958006)
 * Great! I’m glad you were able to get this resolved.
 * Be sure to rate and review my plugin to let others know how you like it.
 * Thanks for using Force Login!

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

The topic ‘Dynamic URL – Example’ is closed to new replies.

 * ![](https://ps.w.org/wp-force-login/assets/icon.svg?rev=1904031)
 * [Force Login](https://wordpress.org/plugins/wp-force-login/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-force-login/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-force-login/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-force-login/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-force-login/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-force-login/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Kevin Vess](https://wordpress.org/support/users/kevinvess/)
 * Last activity: [9 years, 2 months ago](https://wordpress.org/support/topic/dynamic-url-example/#post-8958006)
 * Status: resolved