HomePage › Forums › Themeforest › Organey – Organic Food WooCommerce WordPress Theme › Organey Search Form placeholder
- This topic has 28 replies, 2 voices, and was last updated 3 years, 1 month ago by Supporter.
-
AuthorPosts
-
September 14, 2021 at 3:25 pm #3619owenSupport Expired
How can I change the placeholder of Organey Search Form provided by the theme? Thank you.
September 14, 2021 at 4:07 pm #3620Hi you,
Please copy this function and paste to file functions.php( child-theme):
function organey_product_search() { if (organey_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:', 'organey'); ?></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…', 'organey'); ?>" autocomplete="off" value="<?php echo get_search_query(); ?>" name="s"/> <button type="submit" value="<?php echo esc_attr_x('Search', 'submit button', 'organey'); ?>"><?php echo esc_html_x('Search', 'submit button', 'organey'); ?></button> <input type="hidden" name="post_type" value="product"/> </form> </div> </div> <?php } }
And change this text:
<?php echo esc_attr__('Search products…', 'organey'); ?>
September 14, 2021 at 4:16 pm #3621owenSupport ExpiredIt works! Thank you.
But is it applying to all search form in the site?
September 14, 2021 at 4:21 pm #3622No, this code only applies to the ajax search function at the header.
September 14, 2021 at 4:27 pm #3623owenSupport ExpiredI also find out that there are some white spaces appeared before the search bar. The html code become this after I add the code.
<form role="search" method="get" class="woocommerce-product-search" action="https://good-sup.com/"> <label class="screen-reader-text" for="woocommerce-product-search-field-1">Search for:</label> <input type="search" id="woocommerce-product-search-field-1" class="search-field" placeholder="Search your product..." autocomplete="off" value="" name="s">
How can I fix this? Thank you.
- This reply was modified 3 years, 2 months ago by owen.
September 15, 2021 at 12:24 am #3631Hi,
Please remove all codes:
in the above codeSeptember 15, 2021 at 11:48 am #3632owenSupport ExpiredThose white space come out from the above php code. What should I do to remove those white spaces? Thank you.
September 15, 2021 at 11:59 am #3633Hi,
Please send admin web account for me, I will check and try to help you.
September 15, 2021 at 1:30 pm #3635owenSupport ExpiredThis reply has been marked as private.September 15, 2021 at 1:32 pm #3636owenSupport ExpiredAlso, I want to change the ‘Login’ wording for the ‘Organey Account’ element on the top right hand corner of the header. How can I do this? Thank you.
September 15, 2021 at 2:01 pm #3639Hi again,
#1. Search form: I resolved this issue.
#2. Translate text:
I installed Loco translate plugin for your site, please go to Translate text on theme, search your text and add translate.
September 15, 2021 at 2:02 pm #3640owenSupport ExpiredI will check this out. Once again thanks for your help!
September 15, 2021 at 2:04 pm #3642You are welcome.
Keep contact with us when you need to help and hope you will vote 5 stars for our team.
Thanks!
September 15, 2021 at 3:36 pm #3643owenSupport ExpiredIt it Loco translate is not working for phrases in Woocommerce? I tried to change the wording for ‘Compare’ ‘Add to Wishlist’ in the single product page but it was not successful. How can I achieve this? Thank you.
September 15, 2021 at 3:52 pm #3645You need to translate text on plugin:
– Wishlist: WPC Smart Wishlist for WooCommerce
– COmpare: WPC Smart Compare for WooCommerce
-
AuthorPosts
You must be logged in to reply to this topic.