Title: Parameter by URL
Last modified: August 22, 2016

---

# Parameter by URL

 *  [netmorix](https://wordpress.org/support/users/netmorix/)
 * (@netmorix)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/parameter-by-url/)
 * is it possible to give the loop a GET parameter from an URL ?
 * e.g. [loop … field=”product_type” value=”<?$_GET[‘product_type’] ?> or something
   like that… ? I tried it with the pass but that didn’ work…
 * Kindest regards
 * [https://wordpress.org/plugins/custom-content-shortcode/](https://wordpress.org/plugins/custom-content-shortcode/)

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

 *  Plugin Author [Eliot Akira](https://wordpress.org/support/users/miyarakira/)
 * (@miyarakira)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/parameter-by-url/#post-5831076)
 * At this moment there’s no shortcode parameter for this. I’ll think about a way
   to implement it.
 * For now, if the code is in a file, you can use PHP mixed with shortcodes as you
   described. For example, put the code in _wp-content/views/loop.html_, and include
   it in the page:
 *     ```
       [load dir="views" file="loop.html"]
       ```
   
 *  Plugin Author [Eliot Akira](https://wordpress.org/support/users/miyarakira/)
 * (@miyarakira)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/parameter-by-url/#post-5831192)
 * In the latest update, I added a way to access a global variable.
 *     ```
       [pass global="_GET" field="product_type"]
         [loop .. field="product_type" value="{FIELD}"]
           ...
         [/loop]
       [/pass]
       ```
   
 * Also, there are new parameters for [if]..
 *     ```
       [pass global="_GET" field="product_type"]
         [if pass="{FIELD}" pass_empty="false"]
           The field is not empty.
         [/if]
         [if pass="{FIELD}" value="special"]
           The field value is: special
         [/if]
       [/pass]
       ```
   
 * ..and [array]..
 *     ```
       [array global="_GET"]
         The product type is: [field product_type].
       [/array]
   
       [array global="_GET" debug="true"]
         This displays the contents of the whole array.
       [/array]
       ```
   
 * Please let me know if that works for you.

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

The topic ‘Parameter by URL’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/custom-content-shortcode_766976.svg)
 * [Custom Content Shortcode](https://wordpress.org/plugins/custom-content-shortcode/)
 * [Support Threads](https://wordpress.org/support/plugin/custom-content-shortcode/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-content-shortcode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-content-shortcode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-content-shortcode/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Eliot Akira](https://wordpress.org/support/users/miyarakira/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/parameter-by-url/#post-5831192)
 * Status: not resolved