Condition post type

I’m using Bricks Extra’s header search as well as Relevanssi. Now I have 2 questions.
With Relevanssi I have limited the displayed search results to posts and pages only. When I list a result on a post, I want the publishing date to show. When I list a result on a page, I don’t want it to show. I guess the condition would be something like post_type is post and post_type is page (or post_type is not post). But the native Bricks conditions don’t offer the condition of Post Type. How else can I solve this problem?
I have a text field that says ‘Your search generated the following results’ But when there is no result, I want it to say ‘Your search generated no results’. How can I achieve this?
Thanks already.


I can’t believe it but it seems you’re right, post type condition is missing!!!

This needs to be added ASAP, PLEASE :pray:

1 Like

Yes, this is one of the most important conditions!!! Missing is for example:

  • Post Type
  • Archive + definition for which archive the condition should be true

@timmse Could you please check. Post Types and Archives in conditions are heavily missing! Could you please consider adding this anytime soon.

You can use the built in WordPress function by setting the condition to:

Dynamic Data > Output PHP Function > {echo:get_post_type} > == > ENTER YOUR POST TYPE

I hope this helps! Maybe eventually the Bricks team will build it into the builder, but for now, this works for me.

1 Like