• Resolved singlecoil

    (@singlecoil)


    I′m using the search widget on the page, is there any way to change or delete the “Type to search here …” text that is displayed in the search field until something is typed into it ?

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • AddWeb Solution

    (@addweb-solution-pvt-ltd)

    hello singlecoil,

    Here’s a snippet. Put it in your functions.php file

    function wpforo_search_form( $html ) {
    
            $html = str_replace( 'placeholder="Search ', 'placeholder="Press ENTER to search ', $html );
    
            return $html;
    }
    add_filter( 'get_search_form', 'wpforo_search_form' );

    Hope this will helps you.

    Thanks.

    Thread Starter singlecoil

    (@singlecoil)

    Excellent workaround, thanks so much – works perfectly ! Can I also put this code into the “additional CSS” section of WordPress or will this not work for the functions.php ?

    AddWeb Solution

    (@addweb-solution-pvt-ltd)

    No, you can not put this in additional css it should be in functions.php only.

    Thread Starter singlecoil

    (@singlecoil)

    Okay, thanks – will this additional entry get lost when the theme is updated next time ? If so, is there any way to avoid this ?

    AddWeb Solution

    (@addweb-solution-pvt-ltd)

    yes it will be lost if you update the theme.but if you write this code in your child theme’s functions.php file then it will remain.

    Thread Starter singlecoil

    (@singlecoil)

    Sorry, forgot to mark this thread as solved

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Customizing search widget text’ is closed to new replies.