Loading...

bS Grid and bS Swiper update

bS Grid and bS Swiper Shortcodes

Both files are the most downloaded plugins here and getting an update in the shortcodes. Now it’s possible to show custom-post-types by terms-slug and single-items by id.

Motivation

By the last plugin-update it became possible to show custom-post-types from a parent-id of the taxonomy. But more and more users asked if it’s possible to filter custom-post-types simply like normal posts by category-slug in the shortcode.

Because both plugins share the same spirit, they also share the same pieces of shortcode to choose what to show. It is easier for us to update both plugins at the same time.

In conclusion, they can show everything now. At best, you check the new shortcodes in the docs for bS Grid and bS Swiper.

Shortcode updates

Select by taxonomy and terms-slug

Now it’s possible to show posts by tags (terms) or any custom-post-type by terms.

[bs-swiper-card type="post" tax="post_tag" terms="bikes, motorbikes" order="DESC" orderby="date" posts="5"]
[bs-swiper-card type="my-custom-post-type" tax="my_cpt_category" terms="dogs, cats" order="DESC" orderby="date" posts="5"]

If that sounds already good to you, we have a little more:

Select by single-id

You can cherrypick items you want to show by id. This works for all pages, posts and custom-post-types.

[bs-swiper-hero-fade type="page" id="1, 2, 25, 39, 42"]
[bs-list type="post" id="8, 15, 23"]
[bs-grid type="my-custom-post-type" id="7, 40, 64"]

In combination with the swiper-hero templates you are now able to create complex slideshows without organizing pages in child-pages. Simply select them by id.

How to update

Both plugins using a single-click-updater in your backend. Force them by clicking “Check for updates” in the plugin list.

Shortcodes are written in the template files. If you have overridden them in your theme, you must update them as well to use new shortcodes.

If you use a shortcode like this to show custom-post-types:

[bs-swiper-card type="isotope" tax="isotope_category" cat_parent="111" order="DESC" orderby="date" posts="10"]

Note that this one is replaced by the new terms-slug shortcode. Adjust your shortcode to the new one or store old template-file in your child-theme to keep this shortcode working before pressing the update-button. Check the documentation how to override plugin-templates in child-theme.

If you do not want to update, just remove update-snippet in plugin’s main.php.

Happy new year!

To top