I’m trying to create a function for the title inside my functions.php, I’m having a problem with the search title part where I have to concatenate here’s the part with issues:
elseif (is_search()) {
_e('Search for ', 'textdomain') . '"' . esc_html(the_search_quey()) . '$quot; - '; }
this one gives a title like this: Search for searchtermsitename
no quotes and the search term is attached to the site name.
I tried this one:
elseif (is_search()) {
_e('Search for ' . '"' . esc_html(the_search_quey()) . '$quot; - ', 'textdomain'); }
it doesn’t work either, this one outputs: searchtermSearch for “” sitename
it’s better than the first one but he search query is before, and can’t figure out why.
so any help, and thanks in advance.