Title: [Feature Request] SQL Clauses Array
Last modified: August 26, 2020

---

# [Feature Request] SQL Clauses Array

 *  [Howdy_McGee](https://wordpress.org/support/users/howdy_mcgee/)
 * (@howdy_mcgee)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/feature-request-sql-clauses-array/)
 * Hello,
 * I’m working through customizing a WPSL template to include taxonomies per this
   super helpful comment:
 * [https://wordpress.org/support/topic/more-taxonomies/#post-12795428](https://wordpress.org/support/topic/more-taxonomies/#post-12795428)
 * Ons thing I would love to see is a “posts_clauses” hook that splits up the SQL
   into a Array of key value pairs. Very similar to how WordPress does their [`post_clauses` hook](https://codex.wordpress.org/Plugin_API/Filter_Reference/posts_clauses).
   For backwards compatibility this could be a hook that runs before `wpsl_sql` 
   and the “built” query gets passed into the `wpsl_sql` hook.
 * It would make it much easier to modify specific portions of the SQL query such
   as joins or selects without having to `str_replace()` or copy/paste the query
   into the `wpsl_sql` hook.

The topic ‘[Feature Request] SQL Clauses Array’ is closed to new replies.

 * ![](https://ps.w.org/wp-store-locator/assets/icon-256x256.jpg?rev=1007784)
 * [WP Store Locator](https://wordpress.org/plugins/wp-store-locator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-store-locator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-store-locator/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-store-locator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-store-locator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-store-locator/reviews/)

## Tags

 * [sql](https://wordpress.org/support/topic-tag/sql/)

 * 0 replies
 * 1 participant
 * Last reply from: [Howdy_McGee](https://wordpress.org/support/users/howdy_mcgee/)
 * Last activity: [5 years, 9 months ago](https://wordpress.org/support/topic/feature-request-sql-clauses-array/)
 * Status: not a support question