Display Templates on 404 or Search Pages

I’d like to conditionally display a header template only on 404 and search pages. But I don’t see the ability to target those page types in Bricks’s conditions.

Use Dynamic data option in the condition dropdown.


== 1

for 404 pages



== 1

for search result pages.


1 Like

Thank you @Sridhar - super helpful answer and I didn’t know that capability to output WordPress functions in that was was possible. Great to know.

However, this doesn’t work for me.

Here’s what I tried for my config

Okay, so these conditions DO work. I think part of the issue is, and it’s possibly a bug, is that when I added these conditions as an OR condition to my header template along with my other conditions, the output wasn’t being respected by bricks.

Basically, this set of conditions doesn’t work and I think it should work.

However, when I created a NEW template that only used the dynamic data conditions the header DISPLAYED as expected. Which is odd. I would expect the the template to display if any of these conditions are met.