• Is there any way to change the placeholder text with the search form? We currently have it showing as “Search for Posts”. This is controlled by a setting with our theme where we tell it to include all post types on the site. If we change this setting to just search products, the placeholder text says “Search for Products”. This may be a question to ask the theme authors. I’ve already done this and they said I need to install a language translator plugin to be able to change the text here. We don’t want to do that. So I thought I’d ask you if there is an easier way to do this with your plugin. Thanks if you can provide any assistance here.

    We only want the placeholder text to say “Search”. Should be simple, but so far it hasn’t been simple.

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

Viewing 1 replies (of 1 total)
  • Plugin Author Mikko Saari

    (@msaari)

    Relevanssi has no way to change the search form, it’s all in your theme.

    It may be possible to change the search form with the get_search_form filter hook WordPress provides. Another option is to modify the template file the search form is.

    This is where the placeholder is defined:

    <input type="text" class="s wd-search-inited" placeholder="Search for posts" value="" name="s" aria-label="Search" title="Search for posts" autocomplete="off">

    You’d need to change that “placeholder” parameter. Modifying the form directly may require you to create a child theme.

    It would be great if the theme developer just provided an option to change this at will, but that’s a lot to ask, I suppose…

Viewing 1 replies (of 1 total)
  • The topic ‘Changing placeholder text?’ is closed to new replies.