-
aaronmckeon
Is it possible to display a header block before query loop results but only if results exist? Currently, I only see a way to add a block if no results exist. The reason is because I want to have a heading above looped items but only if those items exist. If this feature does not exist, can you put it in as a feature request? Thanks.
— Aaron
-
Hi there,
You can simply use CSS to achieve what you want.
If you are not familiar with CSS, you can link me to the page with the heading and no results query.
-
aaronmckeon
Thanks – CSS is not my strength! I’ve provided the URL and password in the private information.
-
George
Hello,
Put the heading and the loop inside a container and assign the container a class, eg:
your-container.Then use this CSS:
.your-container:has(+ div:empty) { display: none; }
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.