Title: Passing query string param into Rules
Last modified: August 22, 2016

---

# Passing query string param into Rules

 *  Resolved [i001962](https://wordpress.org/support/users/i001962/)
 * (@i001962)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/passing-query-string-param-into-rules/)
 * Neat plug-in. Nice work. The debug theme is handy.Thanks for including that.
 * I’m trying to use a query string parameter to update the User Name (twitter ID)
   in a Rule. Creating a rule per User Name isn’t going to meet our requirements.
   How would you suggest making the Rule’s values dynamic? We grab the url params
   using the urlparams plug-in.
 * Any suggestions on how to do that would be appreciated.
 * [https://wordpress.org/plugins/fetch-tweets/](https://wordpress.org/plugins/fetch-tweets/)

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

 *  [yepie wpiee](https://wordpress.org/support/users/sorcererayush/)
 * (@sorcererayush)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/passing-query-string-param-into-rules/#post-5537409)
 * let me know if u got any solu
 *  Plugin Author [miunosoft](https://wordpress.org/support/users/miunosoft/)
 * (@miunosoft)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/passing-query-string-param-into-rules/#post-5537462)
 * I’m not 100% what you are trying to do. It does not sound not possible with the
   current version.
 * You can try the development branch. [https://github.com/michaeluno/Fetch-Tweets/archive/2.4.0b.zip](https://github.com/michaeluno/Fetch-Tweets/archive/2.4.0b.zip)
 * Then try this:
    1. Set the `get` parameter to `true` or `1` in the shortcode 
   or the PHP function.
 *     ```
       [fetch_tweets get="1"]
       ```
   
 *     ```
       fetchTweets( array( 'get' => true );
       ```
   
 * 2. Then, set your argument in the URL query like
 *     ```
       http://yoursite.com/?screen_name=miunosoft
       ```
   
 *  Thread Starter [i001962](https://wordpress.org/support/users/i001962/)
 * (@i001962)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/passing-query-string-param-into-rules/#post-5537605)
 * Very helpful!
    I’ll give this a try.
 * At first glance this makes me wonder what happens to the other Rule settings 
   like Item Count Exclude Replies etc… I’ll hack around this weekend.
 * Thanks
    Kevin
 * BTW the donate button on GitHub (en.michaeluno.jp/donate) shows me this in Chrome
   browser [http://screencast.com/t/gtjZKsKpy](http://screencast.com/t/gtjZKsKpy)
 *  Thread Starter [i001962](https://wordpress.org/support/users/i001962/)
 * (@i001962)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/passing-query-string-param-into-rules/#post-5537607)
 * miunosoft,
 * Just installed the dev branch and had some rather strange results. [http://goo.gl/Q0doKw](http://goo.gl/Q0doKw)
   
   Where do we set the number of tweets to show when using the query string option?
 * All I really need is the ability to insert a shortcode (from another plugin) 
   into the the Screen Name field in the Add Rule by Screen Name settings. eg [urlparam
   param=”screen_name” default=”i001962″ /]
 * screenshot [http://goo.gl/U8y6gl](http://goo.gl/U8y6gl)
 *  Thread Starter [i001962](https://wordpress.org/support/users/i001962/)
 * (@i001962)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/passing-query-string-param-into-rules/#post-5537620)
 * FWIW I found the default setting for number of tweets.
 *  Plugin Author [miunosoft](https://wordpress.org/support/users/miunosoft/)
 * (@miunosoft)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/passing-query-string-param-into-rules/#post-5537622)
 * > Where do we set the number of tweets to show when using the query string option?
 * You could do something like this.
 *     ```
       http://your-site.domain/your-page/?screen_name=miunosoft&count=2
       ```
   
 * Though it did not let other arguments set with the `get` argument in the shortcode/
   php function. So I’ve updated the development version to merge with other set
   arguments.
 * Now you can do something line this.
 * Shortcode:
 *     ```
       [fetch_tweets get="1" count="2" ]
       ```
   
 * PHP function:
 *     ```
       fetchTweets( array( 'count' => 2, 'get' => true ) );
       ```
   
 * Then access the site like this.
 *     ```
       http://your-site.domain/your-page/?screen_name=miunosoft
       ```
   
 * Regarding the donate button, thanks for the heads up.
 *  Plugin Author [miunosoft](https://wordpress.org/support/users/miunosoft/)
 * (@miunosoft)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/passing-query-string-param-into-rules/#post-5537627)
 * I’ve realized that it was hard to set default values in the shortcode or the `
   fetchTweets()` function with the `get` argument. So I’ve updated the development
   branch.
 * Now you can do something like this.
 *     ```
       [fetch_tweets get="1" screen_name="miunosoft" ]
       ```
   
 *     ```
       fetchTweets( array( 'get' => true, 'screen_name' => 'miunosoft' ) );
       ```
   
 * Then access the site with additional arguments by overriding the set argument
   values.
 *     ```
       http://your-site.domain/your-page/?screen_name=different_screen_name
       ```
   
 * You need to use v2.4.0b04 or above for this functionality.
 *  Thread Starter [i001962](https://wordpress.org/support/users/i001962/)
 * (@i001962)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/passing-query-string-param-into-rules/#post-5537647)
 * This is working nicely. Thanks!
 * What’s not so easy to figure out is how to style to the fetch-tweets container
   with in a page. Styling the Tweets you have made quite easy thanks to your exposing
   the css in the free templates.
 * What I (css noob) am struggling with is how to shrink the width of the post and
   bring it’s z-index up so it’s floats on top of other content pulled into the 
   page.
 * [http://goo.gl/mmGhTW](http://goo.gl/mmGhTW)
 * While this isn’t an issue with your plug-in per se I thought I’d ask if you had
   any pointers towards an answer.
 * Thanks,
    Kevin
 *  Plugin Author [miunosoft](https://wordpress.org/support/users/miunosoft/)
 * (@miunosoft)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/passing-query-string-param-into-rules/#post-5537651)
 * Glad to hear it works for you!
 * Regarding the question of CSS, can you post a new topic about it? I’ll answer
   there. Let’s keep one question per topic. That way, future visitors can find 
   their information easily.
 * Thank you!

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

The topic ‘Passing query string param into Rules’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/fetch-tweets_ffffff.svg)
 * [Fetch Tweets](https://wordpress.org/plugins/fetch-tweets/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/fetch-tweets/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/fetch-tweets/)
 * [Active Topics](https://wordpress.org/support/plugin/fetch-tweets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/fetch-tweets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/fetch-tweets/reviews/)

 * 9 replies
 * 3 participants
 * Last reply from: [miunosoft](https://wordpress.org/support/users/miunosoft/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/passing-query-string-param-into-rules/#post-5537651)
 * Status: resolved