-
Hey! Hope all is well.
I received the below email from Google Search Console;
=======
Sitelinks searchbox issues detected on nighthawks-fk.com
To the owner of nighthawks-fk.com:
Search Console has identified that your site is affected by 1 Sitelinks searchbox issues:
Top Errors
Errors can prevent your page or feature from appearing in Search results. The following errors were found on your site:
Custom query parameter not defined in target URL
We recommend that you fix these issues when possible to enable the best experience and coverage in Google Search.
=======
I’ve taken a look around the other support tickets and would like you to confirm if the below code should work?
// Rank Math - removing error in Google Console
add_filter( 'rank_math/json_ld/search_url', function( $url ) {
if ( 'en' === ICL_LANGUAGE_CODE ) {
return 'https://www.nighthawks-fk.com/?lang=en&s={search_term_string}';
}
return $url;
} );=======
Many thanks, J
The ticket ‘Custom query parameter not defined in target URL’ is closed to new replies.