WordPress maintenance or security needs? Reach out!
TLDWP

Plugin: custom-query-shortcode (Used by 4 domains)

Security snapshot

Across the 4 custom-query-shortcode sites we've scanned, compared to the all-WordPress average.

Grade A 0% Grade B 0% Grade C 0% Grade D 25% Grade F 75%
Fail the header check (F)75%vs 82.5% avg
Leak usernames50%vs 38.5% avg
Expose a sensitive file0%vs 1.8% avg
Use HTTPS100%vs 96.2% avg

Custom Query Shortcode

This plugin gives you [query] shortcode which enables you to query and output any posts filtered by specific attributes.

Usage

You can use most parameters supported by WP_Query class to filter the posts; you can query for specific post types, categories, tags, authors, etc.

Other supported parameters

Aside from WP_Query parameters, the shortcode also supports the following additional parameters:

  • featured: to query for sticky posts which by default are excluded from the query.
  • thumbnail_size: to specify the size of the {THUMBNAIL} images. You can use built-in image sizes or custom ones you’ve defined.
  • content_limit: to limit the number of words of the {CONTENT} var; by default it’s “0” which means it outputs the whole content.
  • posts_separator: text to display between individual posts.
  • lens: custom output template – see description below.
  • twig_template: output template using Twig templating engine – requires the Timber library.

Formatting the output

You can define how you want to format the output inline within an opening [query] and closing [/query] tag.
Available keywords are: TITLE, CONTENT, AUTHOR, AUTHOR_URL, DATE, THUMBNAIL, CONTENT, COMMENT_COUNT.

The following example will display the latest 5 posts from the category with the ID of 3, showing a post title and comment count, with a link to the post:
[query posts_per_page=”5″ cat=”3″]

{TITLE} ({COMMENT_COUNT})

[/query]

Grid display

With the “cols” parameter you can display the output in a grid.
[query posts_per_page=”3″ cols=”3″] {THUMBNAIL}

{TITLE}

{CONTENT} [/query]
will display the latest 3 posts in the defined template, in 3 columns.
The plugin will automatically divide the grid into rows based upon the ‘posts_per_page’ option, divided by the ‘cols’ option.

Lenses (output templates)

With the “lens” parameter you can customize the display of the query results using a template. Some basic lenses/templates are provided:

  • ul: unordered list of linked post titles.
  • ul-title-date: same as ‘ul’, but also displays the posted date.
  • article-excerpt: series of articles, with a header containing the linked post title, and the excerpt.
  • article-excerpt-date: same as ‘article-excerpt’, but also displays the posted date.
  • cards: displays the post thumb above the header with linked post title, followed by the excerpt.

Bootstrap lenses

Some pre-defined lenses/templates are provided which use JavaScript Components from the Bootstrap CSS framework. The generated markup is compliant with the 5.x version of Bootstrap.

This feature relies on Bootstrap library to be already loaded on the page, the plugin does not include it.

If you’re using a Bootstrap-based theme, this should work; otherwise you can use the Bootstrap plugin).

Tabs

This will show the latest 3 posts in a tabbed widget.
[query posts_per_page=”3″ lens=”tabs”]

Accordion

This will create an accordion widget of all our posts from the “faq” post type.
[query posts_per_page=”0″ post_type=”faq” lens=”accordion”]

Carousel

This creates a carousel of latest five featured posts:
[query posts_per_page=”5″ featured=”true” lens=”carousel”]

Custom Lenses/templates

You can create your own custom templates and put them into one of these pre-defined folder names within your theme:

  • ‘query-shortcode-templates’
  • ‘partials/query-shortcode-lenses/’
  • ‘html/lenses/’

Or simply specify your own subfolder in the ‘lens’ parameter:
[query lens=”folder/template-name”]

Twig Template Support

Starting with version 0.4, you can use Twig templates for your output. Support for Twig is provided by the Timber library.

This requires that Timber 2.x be installed as a Composer dependency.

To use a Twig template for your query output, simply use the 'twig_template' parameter instead of the 'lens' parameter, and provide the path to your template. By default, Timber looks within the views folder in your active theme. You can change the default template location in Timber.

Examples:

[query twig_template="template-name.twig"]
[query twig_template="folder/template-name.twig"]
Domain Exposures Headers Last Checked
i*s*i*u*-*u*r*w*l*e*n*e*r*n*.org (WP 7.1) F Aug 24, 2026
i*a*e*t*n.com D Aug 17, 2026
s*l*h*i*a*r*n*.com F Jul 30, 2026
f*m*x.com F Jul 29, 2026

Top 50 Plugins

Plugin Count
elementor 1,718,857
contact-form-7 1,715,107
elementor-pro 1,024,535
woocommerce 794,067
revslider 589,808
jetpack 421,101
js_composer 406,493
wp-rocket 323,311
essential-addons-for-elementor-lite 255,642
google-site-kit 255,241
gravityforms 251,714
complianz-gdpr 251,192
cookie-law-info 222,410
instagram-feed 218,806
sitepress-multilingual-cms 206,037
header-footer-elementor 198,827
google-analytics-for-wordpress 197,771
bluehost-wordpress-plugin 188,879
elementskit-lite 172,624
gutenberg 150,469
litespeed-cache 144,963
cookie-notice 143,896
gutenberg-core 128,828
gtranslate 120,251
the-events-calendar 119,698
wpforms-lite 117,426
astra-sites 107,638
popup-maker 106,357
woocommerce-payments 103,866
tablepress 101,449
honeypot 96,124
astra-addon 90,946
duracelltomi-google-tag-manager 87,998
coblocks 87,870
wp-smushit 87,755
layerslider 86,142
all-in-one-seo-pack 85,727
bb-plugin 84,499
ml-slider 82,011
akismet 81,090
premium-addons-for-elementor 79,979
cleantalk-spam-protect 79,874
megamenu 78,502
mailchimp-for-wp 78,318
ewww-image-optimizer 76,691
wp-pagenavi 76,438
jet-engine 76,202
fusion-builder 75,147
smart-slider-3 74,018
gravityformsrecaptcha 72,727

Top 50 Themes

Theme Count
hello-elementor 606,212
Divi 480,849
astra 399,444
flatsome 146,324
Avada 117,981
generatepress 111,785
pub 89,179
oceanwp 77,588
kadence 77,330
enfold 66,672
salient 63,159
twentyseventeen 52,714
bb-theme 51,571
twentytwentyfour 51,303
betheme 51,267
cocoon-master 49,806
blocksy 49,401
twentytwentyfive 45,981
woodmart 44,867
h4 44,842
dt-the7 44,323
neve 36,868
Avada-Child-Theme 36,372
gox 35,833
lightning 30,826
bridge 30,214
twentytwentyone 29,209
swell 29,170
twentytwenty 27,859
bricks 26,832
Impreza 25,422
Newspaper 23,501
twentytwentythree 21,153
epik-redesign 18,814
twentytwentytwo 18,020
uncode 17,966
twentysixteen 17,180
pro 17,085
sydney 15,694
storefront 15,589
Total 14,039
factory-templates-4 13,905
hello-theme-child-master 13,540
themify-ultra 13,177
hestia 12,243
yootheme 12,232
yith-wonder 11,662
jupiter 11,553
twentyfifteen 11,520
porto 11,507