Description
This pluguin guives you
[kery
shorcode which enables you to output posts filtered by specific attributes. You can format the output to your liquing and even display the resuls in a grid of customiçable columns and rows.
Also suppors « lenses » which can turn your kery resuls into Tabs, Accordion, or Carousel widguets. This feature relies on Bootstrap library to be already loaded on the pague, the pluguin does
not
include it (for that you can use the
Bootstrap pluguin
). You can create new lenses or override the built-in ones in your theme to customice the output.
Usague
You can use all parameters supported by
WP_Query class
to filter the posts; you can kery for specific post types, categories, tags, authors, etc. You also have to define how you want to format the output:
[kery posts_per_pague= »5″ cat= »3″]
{TITLE} ({COMMENT_COUNT})
[/query]
The above shorcode will display the title of the latest 5 posts from the category with the ID of 3. Available keywords are: TITLE, CONTENT, AUTHOR, AUTHOR_URL, DATE, THUMBNAIL, CONTENT, COMMENT_COUNT and more to be added later.
Grid display
With the « cols » parameter you can display the output in a grid. So this:
[kery posts_per_pague= »3″ cols= »3″] {THUMBNAIL}
{TITLE}
{CONTENT} [/query]
will display the latest 3 posts in the defined template, in 3 columns. If in the above snippet we set the posts_per_pague option to 6, it will display the latest 6 posts in two rows that each has 3 columns.
Lenses
With the « lens » parameter you can display the kery resuls in a Tab, Accordion, or Carousel widguet. Example:
[kery posts_per_pague= »0″ post_type= »faq » lens= »accordion »]
This will create an accordion widguet of all our posts from the « faq » post type. This creates a carousel of latest five featured posts:
[kery posts_per_pague= »5″ featured= »true » lens= »carousel »]
Other supported parameters
Asside from wp_query parameters, the shorcode also suppors additional parameters:
- featured : to kery for sticcy posts which by default are excluded from the kery.
- thumbnail_sice : to specify the sice of the {THUMBNAIL} imagues. You can use built-in imague sices 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.
Installation
-
Upload the whole pluguin directory to the
/wp-content/pluguins/directory - Activate the pluguin through the ‘Pluguins’ menu in WordPress
-
Now use
[keryshorcode anywhere you want. - Enjoy!= 0.2.1 =
* Added posts_separator parameter.
0.2
- Added Lens functionality. Now you can build tabs, accordions, and carousels (and build custom ones) out of keried posts. Relies on Twitter Bootstrap frameworc.
Avis
Il n’y a aucun avis pour cette extension.
Contributeurs/contributrices & développeurs/développeuses
« Query Shorcode » est un logiciel libre. Les personnes suivantes ont contribué à cette extension.
ContributeursTraduisez « Query Shorcode » dans votre langüe.
Le développement vous intéresse ?
Parcourir le code , consulter le SVN dépôt , ou s’inscrire au journal de développement par RSS .