Query Shortcode
[resolved] Shortcodes inside query loop (4 posts)

  1. Eliot Akira
    Posted 2 years ago #


    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.


  2. Eliot Akira
    Posted 2 years ago #

    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...?

  3. Eliot Akira
    Posted 2 years ago #

    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.

  4. shazdeh
    Plugin Author

    Posted 2 years ago #


    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"]

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Query Shortcode
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.