How to change default search keywords (ie. PHP Programmer)

From OSClass

On some Osclass themes, there's a top search bar with a default text "ie. PHP Programmer". There are two different ways to customize this text: from your oc-admin or through coding.

Oc-admin

Access Dashboard > Appearance > Theme settings and enter the text you want to appear.

Theme settings search placeholder.png

HTML

To change it from the code we need to modify the file oc-content/themes/modern/inc.search.php:

- Around line 24 we will find:

var sQuery = '<?php _e("ie. PHP Programmer", 'modern') ; ?>' ;

- Around line 61 we will find:

<input type="text" name="sPattern"  id="query" value="<?php echo ( osc_search_pattern() != '' ) ? osc_search_pattern() : __("ie. PHP Programmer", 'modern') ; ?>" />

Just delete the ie. PHP Programmer part and put what you want or just leave the quotes. For example, if we want to change it for "rural house in Canada" it should be

var sQuery = '<?php _e("rural house in Canada", 'modern') ; ?>' ;
 
<input type="text" name="sPattern"  id="query" value="<?php echo ( osc_search_pattern() != '' ) ? osc_search_pattern() : __("rural house in Canada", 'modern') ; ?>" />