Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author joe_bopper

    (@joe_bopper)

    Hi grosbouff,

    Thanks for getting in touch. It wouldn’t make sense for me to change the form submit control from input to button because it would massively impact other users and it is not the way WP’s default search form is.

    That said, you can adjust the html this plugin outputs via hooks. For your code, you’ll want:

    add_filter( 'bop_nav_search_show_submit_button', function( $show, $item, $depth, $args ){
      echo '<button type="submit" class="search-submit">';
      echo apply_filters( 'bop_nav_search_the_title', $item->title, $item, $depth, $args );
      echo '</button>';
      return false;
    }, 10, 4 );

    Take special note of the return false;, as it’s this that stops the usual submit output.

    Hope this helps.

    Cheers,
    Joe

    Plugin Author joe_bopper

    (@joe_bopper)

    I’ve now set this as resolved. If you need further assistance, please feel free to change it back and get in touch.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘use a button instead a input’ is closed to new replies.