Archived topic
Sidebar posts on read theme
3 replies · Started by Richard on December 9, 2021
Hi, I am having trouble displaying certain posts on Read theme's sidebar. There's a shortcode that displays:
[wp_show_posts name="Sidebar Latest Posts" settings="tax_term=industry-news"]
where "industry-news" is suppose to be a tag? or category?
Neither worked for me so how does this feature work?
Hi there,
this is a question best suited for WP Show Posts support forum.
But here you can see some examples for the settings args including using taxonomies:
https://wpshowposts.com/support/topic/dynamically-show-3-or-4-posts-by-page-id/#post-33893
So if I am understanding this correctly, tax_term is the category?
Hi Richard,
Here's a brief explanation about the usage:
On a shortcode example like this:
[wp_show_posts name="Sidebar Latest Posts" settings="taxonomy=category&tax_term=humanities"]
the taxonomy=category part specifies the taxonomy. This is changeable depending on what taxonomy terms you want displayed for specificity. The most common values for this are category which is for post categories and post_tag which is for tags.
the tax_term= specifies the taxonomy term you want to display. The value to be added should be the slug of the taxonomy term.
So for example, if you want to display posts from Tags taxonomy of term "Historical Drama" w/ a tag term slug of historical_drama, you do it like this with the shortcode:
[wp_show_posts name="Sidebar Latest Posts" settings="taxonomy=post_tag&tax_term=historical-drama"]
Another example would for if you want to display multiple category terms. (ex. Plants(slug = plants), Animals(slug = animals), People(slug=people)).
[wp_show_posts name="Sidebar Latest Posts" settings="taxonomy=category&tax_term=plants, animals, people"]