HomePage › Forums › Themeforest › Melawell – Medical Elementor WooCommerce Theme › How to change wording in search field and remove categories dropdown from search
- This topic has 1 reply, 2 voices, and was last updated 1 year, 10 months ago by Supporter.
Viewing 2 posts - 1 through 2 (of 2 total)
-
AuthorPosts
-
November 23, 2022 at 6:54 pm #8194dino.hajricSupport Expired
Hi there,
I need to change the search products text in the search field with my own text, and I don’t need the categories dropdown, can I remove it?
I am developer, so in case there is something we need to change in code please share.
Thanks,
DinoNovember 23, 2022 at 11:37 pm #8199Please copy this custom code and paste into` the file functions.php ( child-theme):
function melawell_product_search() { if (melawell_is_woocommerce_activated()) { static $index = 0; $index++; ?> <div class="ajax-search"> <form role="search" method="get" class="woocommerce-product-search" action="<?php echo esc_url(home_url('/')); ?>"> <div class="melawell-search-product-form"> <div class="search-wrapper"> <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…', 'melawell'); ?>" autocomplete="off" value="<?php echo get_search_query(); ?>" name="s"/> <input type="hidden" name="post_type" value="product"/> </div> <button type="submit" value="<?php echo esc_attr_x('Search', 'submit button', 'melawell'); ?>"> <i class="melawell-icon-search"></i> <span><?php echo esc_html_x('Search', 'submit button', 'melawell'); ?></span> </button> </div> </form> <div class="ajax-search-result d-none"> <div class="inner"></div> </div> </div> <?php } }
Then edit “Search products…” => “Your text”
-
AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.