WP Plugin Info Card Advanced Queries


Since WP Plugin Info Card 2.5, you can now use the new wp-pic-query shortcode to perform query like on the WordPress.org repository or in your admin area. This shortcode uses the same shortcode parameters as the original one (wp-pic), but you can use extra parameters to filter out what you need. Plugins or themes by author, by tags, by user favorites, etc.

The shortcode will render a list of cards based on the style you choose.

How to use the WPPIC query shortcode

Here is the new shortcode parameters – added in 2.5

  • search: A search term. Default empty.
  • tag: Tag to filter themes/plugins. Comma-separated list. Default empty.
  • author: Username of an author to filter themes/plugins. Default empty.
  • user: Username to query for their favorites. Default empty.
  • browse: Browse view: ‘featured’, ‘popular’, ‘updated’, ‘favorites’.
  • per_page: Number of themes/plugins per query (page). Default 24.
  • cols: Columns layout to use: ‘2’, ‘3’. Default empty (none).

Gutenberg

As of version 3.1.0, there is a Gutenberg option that supports all query parameters.

Plugin Info Card Query Gutenberg
Plugin Info Card Query Parameters in Gutenberg Block

Example Gutenberg Output

You are welcome to use the shortcodes or the Gutenberg block.

Shortcode Examples

Shortcodes are useful if you are using a Page Builder or prefer not to use the blocks that come with WP Plugin Info Card.

[wp-pic-query author="automattic" per_page="6" type="plugin" layout="wordpress" align="center" ajax="yes" cols="2"]
[wp-pic-query user="briKou" per_page="4" type="plugin" layout="wordpress" align="center" ajax="yes" cols="2"]
[wp-pic-query browse="popular" per_page="6" type="plugin" layout="card" margin="1rem" ajax="yes" cols="2"]
[wp-pic-query author="wordpressdotorg" per_page="2" type="theme" layout="card" align="center" clear="after" ajax="yes" cols="2"]
[wp-pic-query tag="dark,four-columns" per_page="4" type="theme" layout="wordpress" align="center" ajax="yes" cols="2"]
[wp-pic-query tag="buddypress" per_page="2" type="theme" layout="large" align="center" align="center"]
[wp-pic-query author="wordpressdotorg" per_page="4" type="theme" layout="flex" align="full" clear="after" ajax="yes" cols="2"]

Leave a Comment