Skip to main content

Questions tagged [exclude]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
2 answers

Getting an error on element query after upgrade to craft 4

I've upgraded a project to craft 4, and now I'm getting an error on my entry query. Below is the code I have: {% set queryFeaturedEvents = entry.featuredEventsLimited.limit(3) %} {% set ...
Julie Velghe's user avatar
0 votes
1 answer

Get entries that aren't related to current user

I am trying to get all the entries that don't related to the current user via a user field. I have used the following code to fetch all the entries that do related to the current user {% set entries ...
LessMore Creative Studio's user avatar
3 votes
2 answers

Exclude most recent entry type from a loop

Hey everyone I am trying to output entries on the homepage. My goal is that the most recent entry is styled differently. I achieved this by calling the loop too times: {% for entry in craft....
Simó Tamás's user avatar
2 votes
1 answer

Excluding specific field value from search

I want to find all entries that match the title field where excludeFromSearch != 1 (is false). {% set query = 'and excludeFromSearch not 1 and ' ~ 'title:"' ~ "myValue" ~ '"' %} {% set results = ...
4midori's user avatar
  • 656
1 vote
0 answers

How to exclude a Matrix block from search?

I'm using a Matrix field as a content builder, allowing the editor to freely create content blocks, titles, images, etc, etc. All of which is content that is required to be searched. But also included ...
Peter Lewis's user avatar
2 votes
1 answer

How to exclude certain fields from .search()

I have an event section in my website with a couple of fields on the entries and one of them is a "related events" field where I can select a other event entries to be shown at the end of the page. I ...
Matthias Redl-Mann's user avatar