HomePage Forums Themeforest Melawell – Medical Elementor WooCommerce Theme How to change wording in search field and remove categories dropdown from search

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #8194
    Support 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.



    Please 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;
    <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; ?>"
    					   placeholder="<?php echo esc_attr__('Search products&hellip;', 'melawell'); ?>"
    					   autocomplete="off" value="<?php echo get_search_query(); ?>" name="s"/>
    				<input type="hidden" name="post_type" value="product"/>
    			<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>
    	<div class="ajax-search-result d-none">
    		<div class="inner"></div>

    Then edit “Search products…” => “Your text”

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

You must be logged in to reply to this topic.