Dynamic Post Filter Parameters

Shortcode

[tag_groups_dpf]

 

Example

[tag_groups_dpf include=1,2,3,5 open=1,2,3,5 caching_time=60]

 

Data Types

  • string: A text. For identifiers that won’t be visible to visitors you often have to replace spaces with _ or -. If the string contains spaces, you need to wrap it in quotes.
  • integer: A number without decimal places.
  • 0 or 1: 0 turns the feature off and 1 on.

 

Parameters

Tags and Terms

taxonomy

Restrict the tags only to these taxonomies. Available are only taxonomies that have been activated in the Settings.

accepted valuesdefaultexample shortcode
comma-separated list of taxonomy namesTaxonomies selected in the settings under “Basics”.taxonomy=post_tag,product_tag

operator

How the tags should be logically connected. Possible values are “IN” (At least one tag matches.), “AND” (All tags match.) and “IN AND” (At least one tag from each group matches).

accepted valuesdefaultexample shortcode
stringINoperator="IN AND"

 

Groups

include

Tag groups that will be selectable by visitors. In the short code you use the IDs, which you find in the left column in the list of groups. Empty or not used means that all tag groups will be used.

accepted valuesdefaultexample shortcode
comma-separated list of integersempty (=all)include=1,5,9

open

Tag groups that are initially open. If you use include, then all selected groups must also be included. Empty or not used means that all tag groups will be open.

accepted valuesdefaultexample shortcode
comma-separated list of integersempty (=all)open=1,9

groups_only

Skip the tag selection and display all products that match the selected groups.

accepted valuesdefaultexample shortcode
integer0groups_only=1

Posts

caching_time

Time in minutes that results remain in the cache.

accepted valuesdefaultexample shortcode
integer10caching_time=10

posts_per_page

How many posts appear under the filter. Use -1 to show all.

Please note that high numbers of posts may impact the performance.

Tip: If you use the parameter “display_amount” you can reduce the additional database request by using posts_per_page=-1 instead of a high number of posts.

accepted valuesdefaultexample shortcode
integer5posts_per_page=10

pager

If the pager is enabled then visitors can load the next or previous page.

accepted valuesdefaultexample shortcode
integer0pager=1

orderby

Which field to use for sorting.

optiondescription
author
date
modified
title
comment_count
accepted valuesdefaultexample shortcode
stringdateorderby=title

order

Whether to sort the posts in ascending or descending order. Ascending order also means from oldest to newest.

accepted valuesdefaultexample shortcode
stringASCorder=desc

display_amount

Whether to display a line that shows the total amount of posts.

accepted valuesdefaultexample shortcode
0 or 10display_amount=1

template

HTML code that contains some placeholders. Leave empty to use the default template. You can edit it also in the settings.

The default template shows every post with a thumbnail – see below. Possible placeholders are: {post_id}, {post_title}, {post_guid} (link to the post, {post_excerpt} (automatically generated), {post_date}, {post_author}, {image_src} or {image_src|100×100} (followed by the dimensions), {image_alt}, {image_size}. Make sure that single or double quotes appear only once as initial and final delimiters, while the other type of quotes can be used inside the template code.

accepted valuesdefaultexample shortcode
stringsee belowtemplate='<a href=“{post_guid}”>{post_title}</a>'

Example for an image tag:

<img src={image_src|100×150}alt={image_alt}{image_size} class=”tg-entry-image” />

Default template:

<header class="tg-entry-header">
   <img src="{image_src|100x100}" {image_size} alt="{image_alt}" class="tg-entry-image" />
   <h3 class="tg-entry-title"><a href="{post_guid}" rel="bookmark">{post_title}</a></h3>
   Posted on {post_date} by {post_author}.
</header>
<div class="tg-entry-content"><p>{post_excerpt}</p></div>

transition

Transition between loading the list of posts.

accepted valuesdefaultexample shortcode
stringnonetransition=fade

static_taxonomy

Optionally filter also by terms of an additional taxonomy (not necessarily one of the taxonomies used for tag groups). Used together with static_terms.

accepted valuesdefaultexample shortcode
stringnonestatic_taxonomy=category

static_terms

Optionally filter also by terms of an additional taxonomy (not necessarily one of the taxonomies used for tag groups). Used together with static_taxonomy.

accepted valuesdefaultexample shortcode
comma-separated list of integersnonestatic_terms=42,255

 

Labels and Messages

placeholder

Placeholder message in the tag input field. It disappears as soon as you enter tags.

accepted valuesdefaultexample shortcode
string“Please enter your tags here.”placeholder=""

posts_placeholder

Placeholder message for the list of posts.

accepted valuesdefaultexample shortcode
string“Please select a group.”posts_placeholder=""

default_option_label

What the pull-down menu should show if no group is selected.

accepted valuesdefaultexample shortcode
string“Filter by group”default_option_label=""

groups_header

Header above the list of selected groups.

accepted valuesdefaultexample shortcode
string“Selected groups:”groups_header=""

message_only_existing

Error message if user tries to enter a tag that doesn’t exist.

accepted valuesdefaultexample shortcode
string0message_only_existing=""

message_same_group

Error message if user tries to enter a tag from another group.

accepted valuesdefaultexample shortcode
string0message_same_group=""

message_nothing_found

Message to show if no posts were found.

accepted valuesdefaultexample shortcode
string“Nothing found.”message_nothing_found=""

message_load_more

Label of the link to load more posts, if the pager is active.

accepted valuesdefaultexample shortcode
string“Load more”message_load_more=""

message_go_back

Label of the link to go back, if the pager is active.

accepted valuesdefaultexample shortcode
string“Go back”message_go_back=""

message_amount_singular

Message if one post was found, if display_amount is active.

accepted valuesdefaultexample shortcode
string“1 post found.”message_amount_singular="One recipe found."

message_amount_plural

Message if many posts were found, if display_amount is active. May contain the placeholder {count}

accepted valuesdefaultexample shortcode
string“{count} posts found.”message_amount_plural="We found {count} recipes."

Advanced Styling

You can set here classes to be referred to in CSS. You need some knowledge of CSS to use these options.

div_class

Define a class for the <div>.

accepted valuesdefaultexample shortcode
stringemptydiv_class=“change-pointer”

article_class

Define a class for the enclosing <article>.

accepted valuesdefaultexample shortcode
stringtg-postarticle_class=“make-it-dark”