I have created a new widget area on my template and created a widget that shows the last 5 questions. The problem I am having is that my site is split into 4 sections. I want to have those 4 sections in the questions/answers and I am wondering if I can somehow filter the questions by the posts category. Can I use shortcodes somehow or some how add a filter to the widget field?
Yes you can show filtered question by simply adding tag or category id in shortcode:
[anspress question_category="category_1,category_2" question_tag="tag1,tag2"]
You can also pass this arguments to anspress shortcode:
- tax_relation – OR or AND (relation between tag and category taxonomy). read more here Taxonomy.
- tags_operator – read more in given link.
- category_operator – read more in given link