Hi, is possible customize no results archive page?
Il possible hide price filter on sidebar and replace notice and search with custom message?
Thanks
This topic has 4 replies, 2 voices, and was last updated 1 weeks, 2 days ago ago by Luca Rossi
Hi, is possible customize no results archive page?
Il possible hide price filter on sidebar and replace notice and search with custom message?
Thanks
Dear @M.,
We hope this message finds you well.
1. To modify the “no results” message displayed during a product search, please add the following custom code to the functions.php file located in your XStore child theme:
function n2t_text_strings( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case 'Unfortunately, there are no products that match your criteria' :
$translated_text = 'Your Custom Text Will Go Here';
break;
}
return $translated_text;
}
add_filter( 'gettext', 'n2t_text_strings', 20, 3 );
2. To hide the price filter widget on the search results page when no products are found, kindly insert the following custom CSS code under XStore > Theme Options > Theme Custom CSS > Global CSS:
.search-no-results .widget_price_filter {
display: none;
}
Should you require any further assistance, please do not hesitate to contact us.
Best regards,
The 8Theme Team
See private content.
Thanks
Dear @M.,
Thank you for your message.
Please note that there is no specific CSS class automatically applied when a product category contains no products.
At the moment, you may use the following CSS as a workaround. However, please be aware that you will need to remove or adjust it once products are added to the category:
body.term-2505 .widget_price_filter,
body.term-2505 .woocommerce-product-search {
display: none;
}
Could you kindly clarify what you mean by “How can I customize the info box?” We would be happy to assist you further once we better understand your request.
Thank you for choosing 8Theme.
Best regards,
The 8Theme Team
You must be logged in to reply to this topic.Log in/Sign up