Filter: bricks/database/content_type
Filters the content type determined by Bricks for the current page request. This affects which template conditions are checked (e.g., whether to look for a single template, archive template, or search results template).
Parameters
Section titled “Parameters”$content_type(string): The detected content type (e.g.,content,archive,search,error,header,footer).$post_id(int): The current post ID.
Example usage
Section titled “Example usage”add_filter( 'bricks/database/content_type', function( $content_type, $post_id ) { // Example: Treat a specific page as a search results page if ( is_page( 'advanced-search' ) ) { return 'search'; }
return $content_type;}, 10, 2 );Was this helpful?
A quick vote and short notes help us improve these docs faster.
Leave a note for us
Thanks for sharing feedback. We're using it to improve these docs.