Nothing to show message in the archives despite of {{dc:looper:count}} is 0

Hey guys.
I’m building an archive-style filtering setup inside the Cornerstone Archive Builder using Themeco Pro , and I’ve run into a bit of a block when trying to show a fallback message when no results are found (instead of getting the default “Nothing to show right now” page).

:wrench: Setup Overview:

  • Post Type : exercise_gallery
  • Custom Taxonomies :
    • body_part (e.g., chest, legs)
    • stage (e.g., stage-1, stage-2)

:white_check_mark: Sections I’ve Built:

I’ve created 3 separate content sections inside the Archive Layout:

  1. Section 1 — Displays all exercises when no filters are selected.
    Condition: {{dc:url:param key="body_part" fallback=""}} is ""
  2. Section 2 — Filters by body_part only.
    Condition: {{dc:url:param key="body_part" fallback=""}} is not "" AND stage is ""
  3. Section 3 — Filters by both body_part AND stage .
    Condition: {{dc:url:param key="body_part" fallback=""}} is not "" AND stage is not ""
    (This one uses a dynamic string query to filter results based on both taxonomies.)

Each section has its own Looper Provider querying exercise_gallery posts using tax_query via string query.

:warning: The Problem:

When someone filters the gallery with a combination like:

/exercise-gallery/?body_part=triceps&stage=stage-3

…and no results exist , WordPress renders the default “Nothing to Show Right Now” fallback page — and none of my custom layout appears. So I lose control over the design completely.

:bulb: What I Tried:

To prevent this, I added a 4th section that should only appear when no results are found . Here’s what I did:

  1. Created a new section with a simple fallback message.
  2. No Looper Provider on this fallback section.
  3. Set the condition to:
{{dc:looper:count}} is 0  
  1. Also tried:
{{dc:looper:count index="1"}} is  0  
  1. I also added a hidden looper section with the same query string as Section 3, just to ensure something is counted — but it doesn’t seem to trigger.

:question: What I Need Help With:

  • Why isn’t dc:looper:count working as expected to detect 0 results?
  • Is there a Themeco-recommended way to override the default “Nothing to show” fallback and replace it with my own section when no posts match the query?

Would love your guidance on this — everything else about the archive works beautifully, but I’d love to fix this one last piece.

Thanks in advance! :pray:

Hello @cezarzw,

Thank you for the inquiry.

Did you check if the dc:looper:count is used within the Looper Provider or Looper Consumer? If you can provide the page where you’re testing this, we’ll try to check it further. You can include the site URL and login info in the secure note.

Best regards.