How to change the title of breadcrumb for search result page?

Hi,

I’m trying to change the title of breadcrumb for search result page. I’m using renew stack and tried to edit the following code in _landmark-header.php file which is located at /x-child/framework/legacy/cranium/headers/views/renew/.

<?php elseif ( is_search() ) : ?>
        <h1 class="h-landmark"><span><?php _e( 'Search Results', '__x__' ); ?></span></h1>

Nothing changed.

How can I do this?

Thank you.

Hi There,

Please add the following code under functions.php file locates in your child theme:

function my_custom_strings($translated_text, $text, $domain) {
	$translated_text = str_replace("Search Results", "Search Results Edited", $translated_text);
	return $translated_text;
}
add_filter('gettext', 'my_custom_strings', 100, 3);

Hope it helps :slight_smile:

It works fine.

Thanks a lot.

You’re welcome.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.