- This topic has 7 replies, 3 voices, and was last updated 1 year, 6 months ago by David.
-
AuthorPosts
-
August 18, 2022 at 8:08 am #2316760Yannick
Hello,
I am using a cpt archive page with filters/facets. If the filter returns no posts, there isnt a “no results” layout in GeneratePress. I added a link that shows the problem in the private information.
I thought I found an old forum post about that topic, but I am not able to find it again. Is there a way to add a “no results” layout to an archive page with GP Elements or some custom code?
Regards
YannickAugust 18, 2022 at 5:28 pm #2317063Fernando Customer SupportHi Yannick,
With your filter plugin, when there’s no results in your filter, it doesn’t use the no-results/404 template. It still uses your the archive template.
You can try creating a script such that if the results are empty, display a text. It would probably be best to reach out to a developer with regards to this, or the the plugin developer of the filter.
August 19, 2022 at 2:01 am #2317286YannickHi Fernando,
I did some more testing and I dont think that the problem is realted to the filter plugin.
If I deactivate the GP block element I used as a content template the no results layout is shown. So I think the problem is realted to GP Elements and not my filter plugin? Or is it a problem with my setup that the no results layout is not working with a block element.
Regards
YannickAugust 19, 2022 at 2:49 am #2317323DavidStaffCustomer SupportAugust 19, 2022 at 8:58 am #2317662YannickHi David, that is exactly what I was looking for. Thank you very much!
A little feature request: It would be great if we could design the whole archive page in one block element and use the Query Loop Block. For my layout I have to use 6 different block elements and some custom functions. Designing an archive page would me a much easier, but unfortunetly there is no hook to replace the whole archive page (or i missed it. In that case you can ignore my request)
August 22, 2022 at 2:02 am #2319751DavidStaffCustomer SupportWe will be adding a new hook and function to allow you to overwrite the Themes loop in the next main update to the theme. And we’re working on a GPP Elements update to make the process of creating Single and Archive templates a much simpler process 🙂
October 14, 2022 at 6:40 am #2373378YannickHi David, I am using the rc candidate of the new version right now and the loop template in combination with the query loop block is awesome! Thank you so much for that!
October 14, 2022 at 7:20 am #2373419DavidStaffCustomer SupportGreat to hear that.
We really appreciate you taking the time to test it… feedback is always welcome 🙂 -
AuthorPosts
- You must be logged in to reply to this topic.