Viewing 15 posts - 1 through 15 (of 29 total)
  • Author
    Posts
  • #3619
    Avatarowen
    Support Expired

    How can I change the placeholder of Organey Search Form provided by the theme? Thank you.

    #3620

    Hi 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&hellip;', '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&hellip;', 'organey'); ?>

    #3621
    Avatarowen
    Support Expired

    It works! Thank you.

    But is it applying to all search form in the site?

    #3622

    No, this code only applies to the ajax search function at the header.

    #3623
    Avatarowen
    Support Expired

    I 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>
     &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    <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 2 years, 7 months ago by Avatarowen.
    #3631

    Hi,

    Please remove all codes: &nbsp; in the above code

    #3632
    Avatarowen
    Support Expired

    Those white space come out from the above php code. What should I do to remove those white spaces? Thank you.

    #3633

    Hi,

    Please send admin web account for me, I will check and try to help you.

    #3635
    Avatarowen
    Support Expired
    This reply has been marked as private.
    #3636
    Avatarowen
    Support Expired

    Also, 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.

    #3639

    Hi 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.

    #3640
    Avatarowen
    Support Expired

    I will check this out. Once again thanks for your help!

    #3642

    You are welcome.

    Keep contact with us when you need to help and hope you will vote 5 stars for our team.

    Thanks!

    #3643
    Avatarowen
    Support Expired

    It 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.

    #3645

    You need to translate text on plugin:

    – Wishlist: WPC Smart Wishlist for WooCommerce

    – COmpare: WPC Smart Compare for WooCommerce

    WPC Smart Quick View for WooCommerce

Viewing 15 posts - 1 through 15 (of 29 total)

You must be logged in to reply to this topic.