Your account expired support, please renew to get your support.
HomePage › Forums › Themes Support › Audib – Audio Store WooCommerce Theme › I want to change the design of product search results
- This topic has 1 reply, 2 voices, and was last updated 10 months, 1 week ago by Billy Nguyen.
Viewing 2 posts - 1 through 2 (of 2 total)
-
AuthorPosts
-
June 22, 2023 at 10:38 pm #35831emancciSupport Expired
When you search for a product, the image of the product appears in a large size.
I want to make this small and change the layout, but what should I do?https://i.postimg.cc/jdCWC9PP/Screenshot-2023-06-23-at-00-31-10.jpg
June 27, 2023 at 1:29 pm #35901Please add this function to the file functions.php( child-theme):
function audib_header_search_popup() { ?> <div class="site-search-popup"> <div class="site-search-popup-wrap"> <div class="site-search"> <?php if (audib_is_woocommerce_activated()) { audib_product_search(); } else { ?> <div class="site-search"> <?php get_search_form(); ?> </div> <?php } ?> </div> <a href="#" class="site-search-popup-close"> <svg class="close-icon" xmlns="http://www.w3.org/2000/svg" width="23.691" height="22.723" viewBox="0 0 23.691 22.723"><g transform="translate(-126.154 -143.139)"><line x2="23" y2="22" transform="translate(126.5 143.5)" fill="none" stroke="CurrentColor" stroke-width="1"></line><path d="M0,22,23,0" transform="translate(126.5 143.5)" fill="none" stroke="CurrentColor" stroke-width="1"></path></g></svg> </a> </div> </div> <?php } function audib_product_search() { if (audib_is_woocommerce_activated()) { static $index = 0; $index++; ?> <div class="site-search ajax-search"> <div class="widget woocommerce widget_product_search"> <div class="ajax-search-result d-none"></div> <form role="search" method="get" class="woocommerce-product-search" action="<?php echo esc_url(home_url('/')); ?>"> <label class="screen-reader-text" for="woocommerce-product-search-field-<?php echo isset($index) ? absint($index) : 0; ?>"><?php esc_html_e('Search for:', 'audib'); ?></label> <input type="search" id="woocommerce-product-search-field-<?php echo isset($index) ? absint($index) : 0; ?>" class="search-field" placeholder="<?php echo esc_attr__('Search products…', 'audib'); ?>" autocomplete="off" value="<?php echo get_search_query(); ?>" name="s"/> <button type="submit" value="<?php echo esc_attr_x('Search', 'submit button', 'audib'); ?>"> <i class="audib-icon-arrow-right"></i><?php echo esc_html_x('Search', 'submit button', 'audib'); ?> </button> <input type="hidden" name="post_type" value="product"/> </form> </div> </div> <?php } }
-
AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.