Dynamic title on the search result page

Hi

Is there currently a way to dynamically display the title on the search result page?
For example, a user searches for the term “bricks”. On the search results page, the title is updated based on the user’s search term. There should be a DD Tags for it. But I can’t find anything. I am right?

Thanks in advance

Yes, add a code element and enter this litte code:

<?php
echo '<h4 class="title">' . esc_html__( 'Results for: "', 'bricks' ) . get_search_query() .'"</h4>';
?>

or even easier, a heading element with this:

search

Results: {echo:get_search_query()}

Cheers

Patric

2 Likes

Hi @Patric,

Thanks for the great solution my friend.