Tell us what you are trying to do?
I'd like to set a conditional so that a block is shown when numbers of items found in a view is not equal 0.
Here are 2 examples for the section with the subheading "Downloads"
A) hidden link
has 1 item in the view (see Download)
B) hidden link
has 0 item in the view (see Download)
the block in the view template has the condition as seen in the screenshot, but the block shows up regardless.
If I leave the static value empty, the block will not be displayed in both.
What is the link to your site?
hidden link
hidden link
Hi,
Thank you for contacting us and I'd be happy to assist.
The condition "Number of items found in Views" can be used inside the view block, whose number of result items, you'd like to evaluate. It can't be used independently, the way you're planning.
If your goal is to show the "Downloads" heading, only when the relevant view includes some results, you can move the heading's code in the view itself, between the "[wpv-items-found]" and "<!-- wpv-loop-start -->" tags. For example:
[wpv-items-found]
<h4>Downloads</h4>
<!-- wpv-loop-start -->
I hope this helps and please let me know if you need any further assistance around this.
regards,
Waqar
Hi Waqar, your solutions is so elegant! Many thanks!