Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
  • #26336

    I am using the WooCommerce Search widget in my sidebar for product searching in the shop. When there are “NO RESULTS” on a search, the resulting page template is completely mis-aligned (see here: The template is fine when there are product results. I have removed all of my own CSS changes to be sure it wasn’t something I’d customized but the results are the same. Any suggestions?

    Thank you,




    Please add this on your custom.css or Quick CSS

    .search-no-results .inner_sidebar .box {
    width: 10px;
    min-width: 200px;
    margin-left: -250px;

    .search-no-results #product_search-2 {
    margin-left: -250px;
    width: 220px;
    padding-left: 20px !important;




    Thank you – this worked for the template but with my custom css added back in it still looks messed up. Really struggling to figure out how to make it work within the theme and my changes. Everything else looks as I want it to look…



    Hi HHMediaDesign

    This is what I’m getting for that link now, is it not correct?





    Wow – I wish that is what I saw!!! This is what I see in both Chrome and Safari. I have emptied my cache but no change.

    oops – nowhere to send an attachment… I have a screenshot which I would like to send you.


    And what is strange is that the text also reads differently on the search page for me. I see the text:


    No products found which match your selection.

    But you see:

    Nothing Found

    Sorry no posts match your criteria

    It looks like yours is search results for the whole site/posts but my search results seem to relate specifically to product search which is what I want.


    Ahh I see the issue now. The woocommerce product search uses a different search results template than the default search. Looks like it attempts to do the same as the regular shop page which also has issues if there are no products within it too.

    I’ll tag the topic for Kriesi as I’m not sure the best way to fix that without doing a partial set of hacks to re-adjust the layout specifically.


    Any news on this? My client is hoping to take the site live soon – I can’t see a work around for the shop search until the template is sorted out so any suggestions/solutions will be much appreciated! Thanks…


    Please add following code to the bottom of functions.php:

    add_action( 'woocommerce_after_main_content', 'avia_woocommerce_404_search_close', 1);
    function avia_woocommerce_404_search_close()
    global $wp_query;
    if( is_search() && empty($wp_query->found_posts) ){ echo "</div>";}

    We’ll include this fix in the next update.


    Thank you!!! Works perfectly!




    Glad it is fixed. :)



Viewing 11 posts - 1 through 11 (of 11 total)

The topic ‘Search results page template’ is closed to new replies.