Title: Queryloop with two post tags
Last modified: April 11, 2023

---

# Queryloop with two post tags

 *  Resolved [denise8a](https://wordpress.org/support/users/denise8a/)
 * (@denise8a)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/queryloop-with-two-post-tags/)
 * Hi,
 * I was trying to use on of the free GB patterns to show some of the posts on a
   page.
 * [https://generateblocks.com/library/?pattern-type=free&pattern-page=1&pattern-preview=4082](https://generateblocks.com/library/?pattern-type=free&pattern-page=1&pattern-preview=4082)
 * I set each query loop with two tags expecting that it will show the posts that
   matched both tags.
 * It didn’t work.
 * Then I found this thread ([https://wordpress.org/support/topic/query-loop-arguments/](https://wordpress.org/support/topic/query-loop-arguments/))
   with a similar issue.
 * If I understood properly, the thing is that instead of looking for a “and” condition,
   the query loops show “or” results. (Posts containing either of the two posts,
   in my case).
 * I have several query loops on my page, so, in order to use the fix proposed on
   that thread, how can I apply it only to one of them?
 * Thanks a lot for your help!
 * Denise

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

 *  Plugin Support [ying](https://wordpress.org/support/users/yingscarlett/)
 * (@yingscarlett)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/queryloop-with-two-post-tags/#post-16645996)
 * Hi Denise,
 * The PHP code is targeting a Grid block (nested in the query loop block) with 
   the CSS class “rock_guitar”, you can change the class of the Grid block to anything
   you want and then change it in the code as well.
 *  Thread Starter [denise8a](https://wordpress.org/support/users/denise8a/)
 * (@denise8a)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/queryloop-with-two-post-tags/#post-16646022)
 * Dah! I just noticed that you explained it at the beginning of your response.
 * Thanks Ying!
   : )
 *  Plugin Support [ying](https://wordpress.org/support/users/yingscarlett/)
 * (@yingscarlett)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/queryloop-with-two-post-tags/#post-16646062)
 * You are welcome 🙂 Hope it works for you!
 *  [fernandoazarcon2](https://wordpress.org/support/users/fernandoazarcon2/)
 * (@fernandoazarcon2)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/queryloop-with-two-post-tags/#post-16718959)
 * Hi there! We haven’t heard back from you for a while now so we’re going to go
   ahead and set this topic as resolved. Feel free to reply if you need any more
   help.

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

The topic ‘Queryloop with two post tags’ is closed to new replies.

 * ![](https://ps.w.org/generateblocks/assets/icon.svg?rev=3239461)
 * [GenerateBlocks](https://wordpress.org/plugins/generateblocks/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/generateblocks/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/generateblocks/)
 * [Active Topics](https://wordpress.org/support/plugin/generateblocks/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/generateblocks/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/generateblocks/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [fernandoazarcon2](https://wordpress.org/support/users/fernandoazarcon2/)
 * Last activity: [3 years, 1 month ago](https://wordpress.org/support/topic/queryloop-with-two-post-tags/#post-16718959)
 * Status: resolved