.issue(':notempty:') - FILTER ONLY NON-EMPTY ENTRIES
Tue Nov 28 2023 13:35:47 GMT+0000 (Coordinated Universal Time)
Saved by
@vankoosh
// FILTER ONLY NON-EMPTY ENTRIES
{% set searchQuery = craft.app.request.queryParam('q') %}
{% if searchQuery == '' %}
{% set searchResults = [] %}
{% else%}
{% set searchResults = craft.entries()
.section('articles')
.type('article')
.issue(':notempty:')⬅️⬅️⬅️
.search(searchQuery)
.orderBy('score')
.cache()
.all()
%}
{% endif %}
content_copyCOPY
Comments