Viewing 2 replies - 1 through 2 (of 2 total)
  • The search functionality and the search reasults page is basically a WordPress feature; it is not a Woocommerce specific area.

    That is why, the proper pages for controlling that feature are inside the “Theme” directories.

    So, if you look inside your theme directory, you can see the search-spesific pages.

    For example, within the twentyfifteen theme, you can look for these files:
    -search.php
    -(if any results) content-search.php
    -(if no result) content-none.php

    That last one is the page you are looking for; you can edit that page as you wish.

    Thread Starter manualmode

    (@manualmode)

    Hi,

    Thanks for your help.

    I found the no-products-found.php in the woo commerce/template/loop folder
    and also the short code from the contact form 7.

    <?php
    /**
     * Displayed when no products are found matching the current query.
     *
     * Override this template by copying it to yourtheme/woocommerce/loop/no-products-found.php
     *
     * @author 		WooThemes
     * @package 	WooCommerce/Templates
     * @version     2.0.0
     */
    
    if ( ! defined( 'ABSPATH' ) ) {
    	exit; // Exit if accessed directly
    }
    
    ?>
    <p class="woocommerce-info"><?php _e( 'No products were found matching your selection.', 'woocommerce' ); ?></p>

    my current problem is that how to add some text e.g. a instruction to fill the contact form at the end of this php file?

    I understand i can replace the “No products were found matching your selection.”,
    but i prefer start a new section as the instruction is very long…

    Regards.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘contact form in the search result if no product found?’ is closed to new replies.