Support » Plugin: A-Z Listing » Filter by tags

  • Resolved over777


    Firstly i would like to say, that it’s a great plugin!

    But i have a problem with filtering by tags.

    I have a home page where all brands are located. But I need to filter them by tags. Is it possible? Or is it possible to make another page with listing already filtered by some tag?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Daniel Llewellyn



    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?

    Plugin Author Daniel Llewellyn



    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:

    add_action( 'init', 'a_z_listing_force_enable_styles' );
Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.