Tell us what you are trying to do?
I have a price database that displays pricing for parts based on which warehouse its stocked at. To do so, I have a custom post type called Parts. The Parts post type has custom fields set up for each warehouse's price and shipping location. I have a taxonomy set up for each warehouse that allows me to group these parts accordingly. I have views set up for each warehouse that returns all part numbers showing the price and ship from location based on the warehouse.
The problem is items that aren't stocked in a warehouse are being returned with no value. If I use the conditional output to prevent showing fields without values, it accomplishes just that except if 50 results are supposed to show and 40 items don't have prices, only 10 items on that page are displayed. There are 1000's of parts in this database so currently, the user has to go through pages with sometimes little to no parts listed to find parts on the following pages.
Is there any documentation that you are following?
N/A
Is there a similar example that we can see?
N/A
What is the link to your site?
hidden link
I don't see any content on hidden link, and I am not sure to understand the goal.
Yes, if you hide with (seme technique, HTML COnditional in this case) your content if empty, it won't show up in the Views.
That's expected, this is exactly what it is supposed to do if we hide the content if there is no content.
I am hence not sure if you want to show ALL Items even if NO content (price) is added, and maybe show a placeholder instead, or if you want to ONLY show the items which in fact have a price.
In that case, you can simply add a Query filter to your View telling the view to get posts there the price is not empty, or you can order the view by price (which will remove all posts that have no price as well) or you can just use HTML conditional and not show that result.
BUT, in this case, you still get the item in the query. HTML conditionals can, in this case, disturb the found count in a view, and hence the pagination too. Is this what you refer to?
In that case, I suggest to either output a placeholder or, to use the Query or ordering setting, so the items are actually not even added to the View, to begin with, and not only hidden in HTML.
Does this help?
My issue is resolved now. Thank you!