My code is as follows
[wpv-layout-start]
[wpv-items-found]
[wpv-found-count]
Stock #
gallery
Caravan
LxW/Bed
Price
Links
[wpv-conditional if="( $(wpcf-price) lte '3000' )"]
[types field='stock-number'][/types]
[types field='main-image' title='%%TITLE%%' alt='%%ALT%%' align='center' size='custom' width="50px" resize='proportional'][/types]
[wpv-for-each start="2" field="wpcf-image-gallery"]
[types field='image-gallery' title='%%TITLE%%' alt='%%ALT%%' size='custom' height='20px' resize='proportional'][/types]
[/wpv-for-each]+ [count_instances field="wpcf-image-gallery"] images
[wpv-post-taxonomy type="caravan-make" format="name"] [types field='caravan-model'][/types]
[wpv-post-taxonomy type="caravan-length" format="name"]x[wpv-post-taxonomy type="caravan-width" format="name"]/[wpv-post-taxonomy type="caravan-bedroom" format="name"]DG: [wpv-post-taxonomy type="double-glazing" format="name"]H: [wpv-post-taxonomy type="caravan-heating" format="name"]
SIV: £[format_money price=[types field='caravan-siv' output='raw'][/types]][/format_money]Price: £[format_money price=[types field='price' output='raw'][/types]][/format_money][wpv-conditional if="( $(wpcf-was-price) ne '' )" evaluate="true"]Was: £[format_money price=[types field='was-price' output='raw'][/types]][/format_money][/wpv-conditional]
[wpv-conditional if="( '[wpv-post-author format='meta' meta='ID']' eq '[wpv-current-user info='id']' )"][wpv-view name="product-update-siv-link" ids='[wpv-post-id]'][/wpv-conditional][wpv-conditional if="( '[wpv-post-author format='meta' meta='ID']' eq '[wpv-current-user info='id']' )"][wpv-view name="product-sell-the-product-link" ids='[wpv-post-id]'][/wpv-conditional]
[/wpv-conditional]
[/wpv-items-found]
[wpv-no-items-found]
[wpml-string context="wpv-views"]No items found[/wpml-string]
[/wpv-no-items-found]
[wpv-layout-end]
I have created a view showing items in conditional, however, I want to count only the items that are output by the conditional statement.
The code I've used above, outputs the 'total' number of posts rather than the number of posts shown in the view
My issue is resolved now. Thank you!
That solved my issue perfectly, I should have looked a little closer than just to assume the conditional would be the way forward.
However, I learnt how to use conditional statements a little more through this journey.