Title: Shortcodes inside query loop
Last modified: August 21, 2016

---

# Shortcodes inside query loop

 *  Resolved [Eliot Akira](https://wordpress.org/support/users/miyarakira/)
 * (@miyarakira)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/shortcodes-inside-query-loop/)
 * Hello,
 * Very nice plugin – I can imagine a lot of uses for it. One thing I noticed was
   shortcodes are not executed inside the query loop. Is it possible to implement
   this? I’ll try to find where to change in the code, it would be helpful for displaying
   custom fields of the posts, etc.
 * Thank you.
 * [http://wordpress.org/plugins/query-shortcode/](http://wordpress.org/plugins/query-shortcode/)

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

 *  Thread Starter [Eliot Akira](https://wordpress.org/support/users/miyarakira/)
 * (@miyarakira)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/shortcodes-inside-query-loop/#post-4100970)
 * Possibly related to this – the `<br>` codes are not displaying as normal. I think
   when the plugin displays {CONTENT}, the output should be filtered for shortcodes
   and line breaks…?
 *  Thread Starter [Eliot Akira](https://wordpress.org/support/users/miyarakira/)
 * (@miyarakira)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/shortcodes-inside-query-loop/#post-4101200)
 * I think I solved the issue of running shortcodes inside the query loop. In the
   query-shortcode folder, inside init.php, there is a line that goes like this:
 * `echo implode( $posts_separator, $output );`
 * I change it to:
 * `echo implode( $posts_separator, do_shortcode($output) );`
 * So far, it seems to be doing the job.
 *  Plugin Author [shazdeh](https://wordpress.org/support/users/shazdeh/)
 * (@shazdeh)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/shortcodes-inside-query-loop/#post-4101303)
 * Hi,
 * You can set the “shortcode” parameter to 1 to run the shortcodes inside the contents.
   This parameter is disabled by default.
 *     ```
       [query posts_per_page="0" post_type="faq" lens="accordion" shortcode="1"]
       ```
   

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

The topic ‘Shortcodes inside query loop’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/query-shortcode.svg)
 * [Query Shortcode](https://wordpress.org/plugins/query-shortcode/)
 * [Support Threads](https://wordpress.org/support/plugin/query-shortcode/)
 * [Active Topics](https://wordpress.org/support/plugin/query-shortcode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/query-shortcode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/query-shortcode/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [shazdeh](https://wordpress.org/support/users/shazdeh/)
 * Last activity: [12 years, 8 months ago](https://wordpress.org/support/topic/shortcodes-inside-query-loop/#post-4101303)
 * Status: resolved