Skip Navigation

[Resolved] Content template doesn't show when there are no items found in archive page

This support ticket is created 2 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by manakM 2 years, 6 months ago.

Assisted by: Luo Yang.

Author
Posts
#2433107

I am trying to get something like this - hidden link where the area with the archive title is generated through a content template.

However, when I use the search filters and the result is "no items found", the content template stops showing and the title area dissapears. Take this search query for instance: hidden link

#2434119

Hello,

The content template is for display post information, it is not recommended to use it to display WordPress Archive information.

In your case, you can try shortcodes, for example:
[wpv-archive-title] This shortcode displays the title of the WordPress archive page:
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-archive-title
For taxonomy archive page, please try shortcode [wpv-taxonomy-archive info="name"]
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-taxonomy-archive

#2435793

Ah, I was hoping that wasn't the case. I had first used reusable blocks there to enable me to standardise the design and easily update it across the website, but I soon found out that conditional blocks don't work within reusable blocks. Which is why I switched to using a content template as another support thread I'd read had recommended it. It would a really nice value add for toolset if you could introduce an alternative to reusable blocks that works with conditional blocks within it as well. Please add that in as a feature request if possible. Thanks!