Customize no results archive page for 8theme

This topic has 4 replies, 2 voices, and was last updated 1 weeks, 2 days ago ago by Luca Rossi

  • Avatar: Mauro Giorgi
    M.
    Participant
    April 10, 2025 at 09:53

    Hi, is possible customize no results archive page?
    Il possible hide price filter on sidebar and replace notice and search with custom message?
    Thanks

    Files is visible for topic creator and
    support staff only.
    3 Answers
    Avatar: Justin
    Luca Rossi
    Support staff
    April 10, 2025 at 11:33

    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

    Avatar: Mauro Giorgi
    M.
    Participant
    April 12, 2025 at 14:42

    See private content.
    Thanks

    Content is visible for topic creator and
    support staff only.
    Avatar: Justin
    Luca Rossi
    Support staff
    April 13, 2025 at 17:30

    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

  • Viewing 4 results - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.Log in/Sign up

Helpful Topics

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.