Title: daniel4ing's Replies | WordPress.org

---

# daniel4ing

  [  ](https://wordpress.org/support/users/daniel4ing/)

 *   [Profile](https://wordpress.org/support/users/daniel4ing/)
 *   [Topics Started](https://wordpress.org/support/users/daniel4ing/topics/)
 *   [Replies Created](https://wordpress.org/support/users/daniel4ing/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/daniel4ing/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/daniel4ing/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/daniel4ing/engagements/)
 *   [Favorites](https://wordpress.org/support/users/daniel4ing/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Multiple loops on frontpage with custom field queries](https://wordpress.org/support/topic/multiple-loops-on-frontpage-with-custom-field-queries/)
 *  Thread Starter [daniel4ing](https://wordpress.org/support/users/daniel4ing/)
 * (@daniel4ing)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/multiple-loops-on-frontpage-with-custom-field-queries/#post-2390221)
 * Got the result, took me long enough…heh
 *     ```
       SELECT DISTINCT wposts.*
       FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta, $wpdb->postmeta wpostmeta2, $wpdb->postmeta wpostmeta3
       WHERE wposts.ID = wpostmeta.post_id
       AND wposts.ID = wpostmeta2.post_id
       AND wposts.ID = wpostmeta3.post_id
       AND wpostmeta.meta_key = 'product_featured'
       AND wpostmeta.meta_value = '1'
       AND wpostmeta2.meta_key = 'product_start_date'
       AND wpostmeta2.meta_value <  '" . date("Y-m-d") . "'
       AND wpostmeta3.meta_key = 'product_end_date'
       AND wpostmeta3.meta_value > '" . date("Y-m-d") . "'
       AND wposts.post_type = 'products'
       AND wposts.post_status = 'publish'
       GROUP BY ID
       ```
   
 * Thanks for the help Mac 🙂
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Multiple loops on frontpage with custom field queries](https://wordpress.org/support/topic/multiple-loops-on-frontpage-with-custom-field-queries/)
 *  Thread Starter [daniel4ing](https://wordpress.org/support/users/daniel4ing/)
 * (@daniel4ing)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/multiple-loops-on-frontpage-with-custom-field-queries/#post-2390220)
 * Thanks for the reply vtxyzzy
 * All 3 meta_key and meta_value queries work separately, just not combined…
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Multiple loops on frontpage with custom field queries](https://wordpress.org/support/topic/multiple-loops-on-frontpage-with-custom-field-queries/)
 *  Thread Starter [daniel4ing](https://wordpress.org/support/users/daniel4ing/)
 * (@daniel4ing)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/multiple-loops-on-frontpage-with-custom-field-queries/#post-2390187)
 * I’ve adjusted the date format, but still the same result.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Multiple loops on frontpage with custom field queries](https://wordpress.org/support/topic/multiple-loops-on-frontpage-with-custom-field-queries/)
 *  Thread Starter [daniel4ing](https://wordpress.org/support/users/daniel4ing/)
 * (@daniel4ing)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/multiple-loops-on-frontpage-with-custom-field-queries/#post-2390144)
 * The date format I’m using is d-m-Y though, why would I have to check it in the
   Y-m-d order?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [tag plus tag](https://wordpress.org/support/topic/tag-plus-tag/)
 *  Thread Starter [daniel4ing](https://wordpress.org/support/users/daniel4ing/)
 * (@daniel4ing)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/tag-plus-tag/#post-2032675)
 * Aye, I might have not put it in the right section but I’m not sure this is the
   right section either… hehe

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