I have saved in the cookie of my website which "unit" he previously selected, but I need to filter in the views, results of the relationships of many to many that have been configured.
There are several cases, but as in "differentials" that has "who recommends" and for each "unit" there are different results or even some equal to another "unit".
How can I display in the view only the results for the "unit" stored in the current cookie?
Hello and thank you for contacting the Toolset support.
I am not very sure to understand your request, but I'll give it a try. Please correct me or provide more details, if you feel that I am answering the wrong question.
Great, by the shortcode I had already gone ahead and created one to return the value of "unit", but now how do I use the view filter with this value to list only the posts related to "unit"?
It is a relationship from many to many, as a "post" can have several "units" or even a "unit" can have several "posts".
If it does not, please allow me temporary access to check your view closely and see what can be done or not. Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **
Thank you for the access credentials and for the details. But, I still need some more details to understand the view and how you are using it.
Check this screenshot hidden link The view is directly used with an Elementor widget. This means that we cannot pass any value(cookie value) as a shortcode argument. We should insert the views with an Elementor shortcode or text module.
On the other hand, the view is not using any filter, this means that it will return all the results. Check this screenshot hidden link
I could not find you custom shortcode either, can you add a screenshot of where it is added? I expected it to be used as an argument for the view shortcode. Can you give me more details about it?
I, also, was not able to visit hidden link always redirected to the homepage. I am not sure what is blocking me right now, but I can't really test with this page.
Finally, I wanted to run a test on a separate page, but I do not have test data to work with. I will need to know a step-by-step explanation of what you want to achieve:
1. User visit ...
2. Clicks on ...
3. Selects ...
4. I expect to have ...
5. Instead, I got ...
The topic ‘[Closed] Filter results in a view using a cookie like the slug of a CPT in relationship.’ is closed to new replies.