Title: Issue with multiple query strings
Last modified: July 23, 2024

---

# Issue with multiple query strings

 *  Resolved [Steve Jones](https://wordpress.org/support/users/stevejonesdev/)
 * (@stevejonesdev)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/issue-with-multiple-query-strings/)
 * Hi!
 * If I have `REQUIRED QUERIES (ANY)` set to `discount=MyDiscount` and there are
   multiple query strings in the URL the block doesn’t display.
 * If `discount=MyDiscount` is the last query string in the URL the block doesn’t
   show as you would expect it to.
 * `?utm_source=My-UTM&utm_medium=referral&discount=MyDiscount`
 * But If `discount=MyDiscount` is the first query string it works and shows the
   block.
 * `?discount=MyDiscount&utm_source=My-UTM&utm_medium=referral`
 * I’m assuming there is some logic issue with the ending query string and the `&`.
 * Thanks,
 * Steve

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

 *  Plugin Author [Nick Diego](https://wordpress.org/support/users/ndiego/)
 * (@ndiego)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/issue-with-multiple-query-strings/#post-17912861)
 * Hi [@stevejonesdev](https://wordpress.org/support/users/stevejonesdev/),
 * Thanks for reaching out. In my local environment, I just tried setting a block
   with `REQUIRED QUERIES (ANY)` set to `discount=MyDiscount`.
 * Then I added `?utm_source=My-UTM&utm_medium=referral&discount=MyDiscount` to 
   the URL of the test page and the block appeared as expected. Switching the string
   to read `?discount=MyDiscount&utm_source=My-UTM&utm_medium=referral` also worked.
 * Is there anything else you can share about your environment. I am wondering if
   this might be a caching issues. 🤔
 * Thanks,
   Nick
 *  [gabriel1957](https://wordpress.org/support/users/gabriel1957/)
 * (@gabriel1957)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/issue-with-multiple-query-strings/#post-17915204)
 * I am hoping that your WordPress team can add a “trigger javascript function” 
   option that would allow users to enter a given javascript function into the URL
   text field. I can add that functionality in the CODE VIEW, but I believe adding
   this as an option in the LINK field would be a great tool. (If such an option
   already exists, how do I access it?)
 * ![](https://i0.wp.com/groovdigit.com/wp-content/uploads/2024/07/link-field.png?
   ssl=1)
 * ![](https://i0.wp.com/groovdigit.com/wp-content/uploads/2024/07/link-script-1.
   png?ssl=1)
 * Thanks for your help! Best wishes, Gabriel
 *  Plugin Author [Nick Diego](https://wordpress.org/support/users/ndiego/)
 * (@ndiego)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/issue-with-multiple-query-strings/#post-17918097)
 * > I am hoping that your WordPress team can add a “trigger javascript function”
   > option that would allow users to enter a given javascript function into the
   > URL text field. I can add that functionality in the CODE VIEW, but I believe
   > adding this as an option in the LINK field would be a great tool. (If such 
   > an option already exists, how do I access it?)
 * [@gabriel1957](https://wordpress.org/support/users/gabriel1957/) is this related
   to Block Visibility, or general request?
 *  [gabriel1957](https://wordpress.org/support/users/gabriel1957/)
 * (@gabriel1957)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/issue-with-multiple-query-strings/#post-17918141)
 * It’s a general request. After asking it here, I was alerted to the option of 
   requesting it elsewhere: [https://core.trac.wordpress.org/ticket/61775](https://core.trac.wordpress.org/ticket/61775)
   I’m sorry for the cross-posting.
 *  Plugin Author [Nick Diego](https://wordpress.org/support/users/ndiego/)
 * (@ndiego)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/issue-with-multiple-query-strings/#post-17919493)
 * > It’s a general request. After asking it here, I was alerted to the option of
   > requesting it elsewhere: [https://core.trac.wordpress.org/ticket/61775](https://core.trac.wordpress.org/ticket/61775)
   > I’m sorry for the cross-posting.
 * No worries, just wanted to confirm. This might be worth [opening an issue](https://github.com/WordPress/gutenberg/issues/new/choose)
   in the Gutenberg GitHub repository. If such functionality was ever implemented
   in Core, it would be first added to the Gutenberg plugin.
 *  Plugin Author [Nick Diego](https://wordpress.org/support/users/ndiego/)
 * (@ndiego)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/issue-with-multiple-query-strings/#post-17945333)
 * Hi @stevejonesdev,
 * Just following up on my comment above. I have not been able to replicate on my
   send. Is there anything else you can share about your environment? I am wondering
   if this might be a caching issues.
 * Thanks,
   Nick
 *  Plugin Author [Nick Diego](https://wordpress.org/support/users/ndiego/)
 * (@ndiego)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/issue-with-multiple-query-strings/#post-17988432)
 * I’m going to close this out since I am not able to replicate and it’s been a 
   couple weeks with no additional follow up. If anyone else runs into an issue,
   please feel free to comment here with additional testing steps, and I will investigate
   further.

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

The topic ‘Issue with multiple query strings’ is closed to new replies.

 * ![](https://ps.w.org/block-visibility/assets/icon-256x256.png?rev=3122657)
 * [Block Visibility — Conditional Visibility Control for the Block Editor](https://wordpress.org/plugins/block-visibility/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/block-visibility/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/block-visibility/)
 * [Active Topics](https://wordpress.org/support/plugin/block-visibility/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/block-visibility/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/block-visibility/reviews/)

 * 7 replies
 * 3 participants
 * Last reply from: [Nick Diego](https://wordpress.org/support/users/ndiego/)
 * Last activity: [1 year, 8 months ago](https://wordpress.org/support/topic/issue-with-multiple-query-strings/#post-17988432)
 * Status: resolved