Hi,
Live-filtering, where the visitor chooses a filter and the list changes, is not possible. However, you can show a list for posts assigned to a specific tag or multiple tags with:
[a-z-listing display="posts" post-type="post" taxonomy="post_tag" terms="tag-slug-a,another-tag-slug,tag-slug-b"]
This will show posts tagged with at least one of the following tags (uses the “slug” which can be found in the tags list):
tag-slug-a
tag-slug-b
another-tag-slug
-
This reply was modified 3 months, 1 week ago by
Daniel Llewellyn. Reason: clarify tags are not all required
Thank you very much!
And the second question – is it possible to use dynamic tags? Like in template for posts?
Hi,
Apologies for the delay in replying. Are you asking about a function to use in a template that will do the same as the short-code? If so, then yes, you can do this easily with:
<?php do_shortcode( '[a-z-listing]' ); ?>
You will want to add the complete short-code that you’d use on a post content inside the quotes. This is how the widget does it, which you can see on line 434 of wp-content/plugins/a-z-listing/widgets/class-a-z-listing-widget.php
.
The problem with this approach is the plugin cannot detect that the short-code is being used and so will not apply the default styling. You can fix that deficiency by adding the following to your theme’s functions.php
file:
<?php
add_action( 'init', 'a_z_listing_force_enable_styles' );