Skip to Content


Change the search input placeholder from “What are you looking for?” to just “Search” for narrow viewports (mobile).

JavaScript February 7, 2021


This function runs automatically, so it is not called manually. Is this incorrect?

Additional Notes

This function triggers the change at 410px wide viewport.

Source File

Located in /assets/js/modules/search.js on line 263.

1 Hook

Find these filters and actions in the source code below to hook into them. Use wp.hooks.doAction() and wp.hooks.addFilter() in your JavaScript file.

Need a new filter hook? Request one here.

This function has no action hooks available. Request one?

nebula.mobileSearchPlaceholder = async function(){
    let mobileHeaderSearchInput = jQuery('#mobileheadersearch input');
    let searchPlaceholder = wp.hooks.applyFilters('nebulaMobileSearchPlaceholder', 'What are you looking for?');

    if ( window.matchMedia('(max-width: 410px)').matches ){
        searchPlaceholder = 'Search';
    mobileHeaderSearchInput.attr('placeholder', searchPlaceholder);


To override or disable this JavaScript function, simply redeclare it with the exact same function name.

nebula.mobileSearchPlaceholder = function(){
    //Write your own code here, leave it blank, or return false.