Hello,
for the following use case I tried to use the “Flex Loop …” items and unfortunately it does not work for me:
On the homepage, I wanted some of the posts filtered by region after user clicks on region buttons. User should be able to choose one or the other region and also should be able delete the filter. All other – non-regional posts should stay the same at the same time.
I have inserte all necessary Flex Loop elements on the page. The “flex loop filters” always says “This shortcode requires you to fill in at least on Taxanomy slug to work.” even though I put some slugs in it. Meanwhile I have tried different taxonomy slugs, but it always gives the same message. As result, there is no button displayed in the frontend. Besides, it does not work together with “flex loop” what is probably because “flex loop filters” does not work.
The documentation was not very helpful for me: https://forum.tagdiv.com/filters-sorting-taxonomies/
Could someone help me with this?
Regards
Nelly
Hi,
If you add a flex loop in the homepage it will display the latest posts from all your categories by default.
If you want to use the filters for the flex loop, then you have to add taxonomy slugs. So for example, I want to display all my categories in the filter, I add the category slug -> https://prnt.sc/gWzHwas7s7Ie
Or, I have a taxonomy called Ingredient for a custom post type -> https://prnt.sc/LwbyOYtRCmWy I add the ingredient slug -> https://prnt.sc/tYz93jI8vnCb
If it’s not working, then it probably means you aren’t using the correct taxonomy slugs. Please make sure you add them correctly, and all the terms from that taxonomy should appear in the filter. If you want I can take a closer look as well. I’ll need admin login for the website, which you can send via email at contact@tagdiv.com and please also include a link to this topic in the email.
Thank you!
Hello Simion,
Thank you very much for your quick reply.
Today I tried again, and sure enough, this time Flex Loop Filter worked – at least partially. I didn’t do anything differently than yesterday. Maybe I should have waited a bit between making changes yesterday.
Nevertheless, thank you for your illustrated guides. They helped me be confident that I wasn’t doing something completely wrong.
Unfortunately, I haven’t been able to fully implement my use case yet. It is now possible to see and select the subcategories. However, I wasn’t able to limit the subcategories to only selected ones. Example: A subcategory called “Region” has three sub-subcategories: “Region A”, “Region B”, and “Region C”. Only these three should be visible to the user. The user should be able to select one, e.g., Region A, and then in the Flex Loop only posts from Region A should appear – or, depending on the selection, Region A and Region B.
I wasn’t able to enter the slugs of the subcategories into the list of slugs. It only accepts ‘category’. Or is there a special syntax I need to use here? Or, how can I display only slugs I want to have within the filter list?
Regards
Nelly
Displaying only a specific level of sub-categories or specific categories isn’t possible unfortunately. That filter is designed to enter the type of taxonomy, not terms from them. So for example it won’t work if you enter the slug of a category.
What about this. If you want to provide the option for visitors to filter a block based on specific categories, then you could just use a block and the ajax filter. That way you can display just the categories you want via their IDs -> https://prnt.sc/2bjedsQOXYvK So visitors can click on those to filter the block.
Thank you!
