WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. raskull
    Member
    Posted 1 year 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?

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

  2. m7csat
    Member
    Posted 1 year 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
    Member
    Posted 1 year 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" />
    Done!

  4. agelonwl
    Member
    Posted 1 year 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

About this Topic

Tags

No tags yet.