Change "Search Results" Text When No Search Results

Hello Themeco,

First of all, thank you for products, we are very glad we choose Integrity for our Wordpress theme!

I had a question regarding the Search Results page, I’ve managed to translate the header Search Results into Zoekresultaten (dutch) via a global javascript edit but this only gets translated/replaced when there are search results.

Only if there are no search results, the header “Search Results” stays the same instead of replaced with “Zoekresultaten”.

Is there a way to fix this? Thank you!

John

PS: is there a way to change the tiny text on the right that also says “search results”? Thank you!

Hey @YoungAdultsAmsterdam,

Thanks for writing in and your kind words. To assist you with this issue, we’ll first need you to provide us with your search page URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

Thank you.

Hello Christian_y,

Thank you for your reply! The website is still under construction (do you need the Wordpress login in a private message?), could it be that the search page is generated an not a static html page? The url reads my websites name with an addition of my search input: http://www.pinkstergemeente-amsterdam.nl/keerpunt/?s=qwerty

I’ve used this Global JavaScript code to change the “Search Results” to “Zoekresultaten”:

(function($){
$(’.search-results h1.h-landmark span’).text(‘Zoekresultaten’);
})(jQuery)

Is there maybe another code to fix the translation when there are no search results?

Thank you!

Hi there,

Please try updating your code to:

(function($){ 
    $('.search-results h1.h-landmark span').text('Zoekresultaten');
    $('.search-no-results h1.h-landmark span, .search-no-results .x-breadcrumbs a.current').text('Your Text Here');
})(jQuery)

Hope this helps.

Hello Jade,

This worked perfectly, thank you!

Kind regards,

John

You are most welcome. :slight_smile:

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