Hi,
We have created a View with a conditional and it seems to be displaying all of the custom posts in the block editor in wp-admin instead of only those specified by the conditional.
When displaying on the front end of the website it does NOT display the incorrect custom post BUT it does leave a blank block where the incorrect post might be displayed.
See this page; hidden link
Toolset Blocks Version is 1.2.1, Toolset Types is 3.3.12 and WordPress is 5.4.2
Thanks in advance for any help you can offer.
Kirk
Hello Kirk and thank you for contacting the Toolset support.
This seems to be a cache related issue, please check if this issue appears when:
- Only Toolset plugins are activated. It will tell us if there is an interaction issue with another plugin.
- The theme is set to a WordPress default like Twenty Fourteen. It will tell us if there is an interaction issue with your theme.
If the problem disappears, start activating one at the time to track where the incompatibility is produced.
If this does not help, I would like to check the conditions on your view's loop. I'll try to reproduce it locally to verify if it is a bug or just an exception that happens on your site/server. If you would allow me temporary access to your admin area, your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **
Hello Kirk and thank you for the credentials.
It is expected that you have an empty grid cell. Because the conditional is already inside the loop. Even if what is inside the conditional is not displayed, the wrapper element of the current post in the loop will be displayed, and anything else inside the loop that is outside of the conditional.
If I understand well your conditional block, you would like to display only the posts where the product type equals "Inverter", right?
In that case, you will need to add this to the view's query filter. That way, only posts that match the conditions will be returned by the view loop and you won't need to use the conditional block.
The conditional block inside the loop will be useful if you want to customize the output per post(post data), for example displaying a different string or image depending on a condition on the post.
Check this screencast where I added the query filter on the product type hidden link
And check the results here hidden link
If this is what you are looking for, you may remove the conditional block as it is not useful anymore and may cause some additional processing time for the page.
If that's not what you would like to have, please elaborate more on what you expect to have?
Thanks so much Jamal.
I can see what you have done fixes my issue but I just seem to get caught up before you start your video.
I have had a quick go at it now but I seem to get stuck before the bit where you show me how to complete the setup.
I can't spend time on this today but if there is a link to a full tutorial video on how to construct a view with a query in your documentation then I would appreciate a link to it.
If not I will proceed to work through it again early next week (I am in Western Australia so it is now Friday morning here).
Given sufficient trial and error I am sure I will get it.
Thanks so much for your help and your patience.
best regards
Kirk
Hello Kirk and thank you for your kind feedback.
Check this Youtube playlist on how to use Toolset in the new Gutenberg Editor hidden link
The first video is produced by Nigel who also provides support here in the forum. Feel free to ask any questions about it here in the forum or if the chat is open.
All the best! Thanks
My issue is resolved now. Thank you!