This support ticket is created 6 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
I am trying to: output a grid of posts but skip those where a field does not meet a requirement
I have inserted a [wpv-conditional] into the content template for the grid cell output but of course when this conditional is not met, the output is blank so I end up with a grid of some filled and some empty cells. What ideally I would like to do is to have the loop jump over the item and go to the next post if the current post does not meet the conditional.
I can't see how to do this.
Incidentally, when I include a [wpv-conditional] in a "template for this view" box, it is ignored but if I create a new content template and refer to that instead, then the conditional is seen...I don't know if this is a bug?
You can see that for now I am outputting just a paragraph break when content with "show_active" not set to "on" is encountered but ideally I'd be skipping that item and checking the next.
What you can do is to add a fixed filter to the view so that it only allows you to search for posts that are on. This will allow you to not use the conditionals to filter the items. Please add a query filter for this and let me know if it helps.
Thanks Shane. I added a filter in the filter editor as follows but this means I need to pass a url parameter when loading the page which "kind of works" but isn't ideal. I can't work out how to write the filter in a way which filters only to show_active="on" which doesn't seem to work.
A URL parameter should not be necessary. Would you mind providing me with admin access for the view so that I can have a look at the filter on the backend ?
The private fields will be enabled for your next response.
Thanks,
Shane
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.