Home › Toolset Professional Support › [Resolved] empty items created in a post loop
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.
Tagged: Framework Installer plugin, How to build a site with Toolset
This topic contains 1 reply, has 2 voices.
Last updated by Beda 8 months, 2 weeks ago.
Assigned support staff: Beda.
we created a page that holds a view of a series of post contents but from time to time it creates some "empty"
items without any reason.
you can see the page at the following url:
if you see some images are not aligned because there are some empty
items that create spage
This should be because there is nothing to display for that item in the list
I assume you have a ShortCode in that list, and that ShortCode displays the contents of a field, but that field is not filled out for each and ever post in the loop.
You can use HTML conditionals to resolve this:
You will be wrapping the entire
into a HTML condition to check if the [shortcode] is empty or not, and only show it if it's not empty.
Another approach can be to orderby that precise field the View, which will automatically exclude all the posts that have no such field.
But usually the HTML conditional solution is neater.
Please let me know if you need more details about this.
Known issues and solutions
Frequently asked support questions
Support tickets archive
Get help from experienced contractors
Meet Toolset support team
Toolset Customer Support Policy
Need to tell us something about the quality of support
How to remove personal information from your database for support