WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Events Manager] remove word "search" from text input without removing it from sub

[Resolved] [Plugin: Events Manager] remove word "search" from text input without removing it from sub

  • raskull
    Member

    @raskull

    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?

    http://wordpress.org/extend/plugins/events-manager/

Viewing 3 replies - 1 through 3 (of 3 total)
  • m7csat
    Member

    @m7csat

    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
    raskull
    Member

    @raskull

    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" />
    Done!

    agelonwl
    Member

    @angelonwl

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] [Plugin: Events Manager] remove word "search" from text input without removing it from sub’ is closed to new replies.