wp-pic
Use [wp-pic] to output a single plugin.
The wp-pic
shortcode can be used to display a single or multiple plugins. See below for the shortcode parameters.
Example shortcode:
type
Can be of type plugin
or theme
. Type plugin
is default.
slug
The slug
(required) parameter can be a single or comma-separated string of plugin slugs.
Comma-separate the slugs to be in multi mode, which will output multiple plugins.
{slug}={title}
A slug can be set in the shortcode attributes to override the title.
Simply use the plugin or theme slug in the shortcode attributes.
Here's an example:
You can do the same for themes:
multi
This must be set to true
if there are multiple slugs. The following extra attributes assist in multi
output:
cols (1-3)
col_gap - Gap in pixels between items
row_gap - Gap in pixels between rows
layout
Default is “card” so you may leave this parameter empty. The default layout can be set in the admin settings.
Available layouts are:
card
large
flex
wordpress
ratings
scheme
Select a card color scheme. Available schemes are scheme1
through scheme14
. The default scheme can be set in the admin settings.
image
Designate an image that will take the place of a plugin's default banner.
align
Set the alignment of the info card. Values can be:
center
left
right
containerid
Set the container ID of the plugin wrapper.
The default is: default: wp-pic-PLUGIN-SLUG
.
margin
Set the margin for the info card. The default is no margin.
clear
Whether to clear the float of the container. Default is empty.
Choices are:
below
after
expiration
By default, the info card are cached at 720 seconds, so as to not ping the WordPress plugin API in excess.
You can change this expiration when outputting your cards.
ajax
Whether to load the plugin in via Ajax.
Choices are: yes
and no
.
custom
Whether to output any strings associated with a plugin or theme.
For plugins: url, name, icons, banners, version, author, requires, rating, num_ratings, downloaded, last_updated, download_link
For themes: url, name, version, author, screenshot_url, rating, num_ratings, downloaded, last_updated, homepage, download_link
Last updated