Events Manager
[resolved] remove word "search" from text input without removing it from sub (4 posts)

  1. raskull
    Posted 3 years ago #

    In the Search Form Options settings, I removed the word "Search" from the "Text search label" field. Unfortunately that also removed the word "Search" from the submit button.

    How can I hook in and fix this so that the keyword input has no text but the submit button does?


  2. m7csat
    Posted 3 years ago #

    Create a template override

    1. Copy /wp-content/plugins/events-manager/templates/templates/events-search.php to /wp-content/themes/<your theme name>/plugins/events-manager/templates/events-search.php
    2. Open the new file and go to line 55 where you will see:
      <input type="text" name="em_search" class="em-events-search-text" value="<?php echo $s; ?>" onfocus="if(this.value=='<?php echo $s_default; ?>')this.value=''" onblur="if(this.value=='')this.value='<?php echo $s_default; ?>'" />
    3. Tweak the part that says onfocus and onblur
    4. Save the file
  3. raskull
    Posted 3 years ago #

    Thanks! Silly me -- I already had a template override for events-search. I changed this:
    <input type="submit" value="<?php echo $s_default; ?>" class="em-events-search-submit" />
    to this:
    <input type="submit" value="Search" class="em-events-search-submit" />

  4. agelonwl
    Posted 3 years ago #

    Latest version 5.2.4, you can easily do that using "Search button text" and "Text search label" at settings > formatting > search form

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Events Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.