Hi,
I have a CPT call FAQ and I created a few taxonomy (kind of tag) for that, and I created a Views for that (and please note that I didn't create any query filter for that Views), when use something like:
[wpv-view name="faq-list"] or [wpv-view name="faq-list" view_display="layout" limit="5"]
the frontend looks very good. However, for now, I only want to show a specific taxonomy on the frontend, is there a way I can add a parameter or data inside of the [wpv-view name="faq-list"] short code to make that happen?
thanks,
Ben
Yes, add a Query Filter for the taxonomy and specify that the View shall only display Posts with the term specified in the ShortCode attribute of your choice.
Then you can insert the View in a page and pass the shortcode attribute you chose with the term you want.
Note, this will only work for Views that Query Posts, and have a Taxonomy Query Filter by ShortCode attribute.
See here a few more informations:
https://toolset.com/documentation/user-guides/views/passing-arguments-to-views/
https://toolset.com/documentation/user-guides/views/passing-arguments-to-views/#filters-by-taxonomies
thank you Beda,
I tried that you suggested and my frontend still showing the posts from all categories instead of the specific category I set.
[wpv-view name="faq-list" view_display="layout" wpvfaqtag="payment"]
and for the query filter, I choose: View shortcode attribute.
Attached is a screenshot , but it's all Chinese characters. If you have problem to view it, maybe we can assign this ticket to Lou Yang, he can read Chinese.
Thank you.
You chose to query the ShortCode attribute by NAME - but you've inserted the SLUG in the ShortCode, it seems to me.
Please change the View Query Filter to use "Slug" of the term, instead of "Name"
That should solve the issue
you are right, the screenshot is Name.
I tried both Slug and Name, but still no luck 🙁
This is strange, but there are 2 more variables:
1. Order by default and secondary ordering, if those are by not native data, then it might be some terms do not have that data and won't show
2. Please try with inserting the entire view [wpv-view name="faq-list" wpvfaqtag="payment"] like so
If that does not work, can you share access?
Ben 你好,
感谢你提供的信息,我可以登录到你的网站并看到改问题,下面是我的找到的问题:
编辑view "faq-list",
hidden link
在“查询过滤器”,我看到你设置了正确的过滤器:
选择分类文章:
FAQ标签 别名在一个,由视图简码属性wpvfaqtag设置
例如 [wpv-view name="view-name" wpvfaqtag="xxxx"]
但是在"搜索和分页"框内,你使用了代码:
[wpv-control-post-taxonomy taxonomy="faq-tag" type="checkboxes" url_param="wpvfaqtag"]
上面的代码会自动覆盖“查询过滤器”的设置。
也就是说,你只能添加一个基于"FAQ标签"的过滤,如果使用了[wpv-control-post-taxonomy taxonomy="faq-tag" ...], 那么在“查询过滤器”的设置就会失效。
你可以尝试移除 "搜索和分页"框内的代码:
[wpv-control-post-taxonomy taxonomy="faq-tag" type="checkboxes" url_param="wpvfaqtag"]
看看修复没有。
My issue is resolved now. Thank you!