Title: Custom sql query
Last modified: August 20, 2016

---

# Custom sql query

 *  [ditikos](https://wordpress.org/support/users/ditikos/)
 * (@ditikos)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/custom-sql-query-2/)
 * I have a custom sql query creating a list of custom posts, that I want to transfer
   that to the detail (post) page. Normally I would use sessions (to put the variable
   $sql in a session), but I would like to know if there is a wordpress way to do
   that, because my site uses users and multilanguage support (wpml) so I would 
   really not like to interfere with those variables.

The topic ‘Custom sql query’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [ditikos](https://wordpress.org/support/users/ditikos/)
 * Last activity: [13 years, 5 months ago](https://wordpress.org/support/topic/custom-sql-query-2/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
