Filter: bricks/get_the_title
Filters the page title returned by Helpers::get_the_title(). This function determines the appropriate title based on the context (single post, archive, search results, etc.).
Parameters
Section titled “Parameters”$title(string): The generated page title.$post_id(int): The ID of the current post or template.
Example usage
Section titled “Example usage”add_filter( 'bricks/get_the_title', function( $title, $post_id ) { // Example: Add a prefix to the title for search results if ( is_search() ) { return 'Searching: ' . $title; }
return $title;}, 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.