• Resolved missodessa

    (@missodessa)


    I followed this instructions to add an icon to my search bar however Im having a little bit of trouble getting the image to to be clickable and submit the search results without totally hacking the code itself. Is there and easy way to accomplish this?

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

Viewing 1 replies (of 1 total)
  • Plugin Author ILLID

    (@mihail-barinov)

    Hello,

    As I understand you are using this code

    add_filter('aws_searchbox_markup', 'aws_searchbox_markup');
    
    function aws_searchbox_markup( $markup ) {
        $pattern = '/(<input\s*type=\"text\".*?\/>)/i';
        $markup = preg_replace( $pattern, '${1}<span class="aws-icon"></span>', $markup );
        return $markup;
    }

    So to add submit button just change it to

    add_filter('aws_searchbox_markup', 'aws_searchbox_markup');
    
    function aws_searchbox_markup( $markup ) {
        $pattern = '/(<input\s*type=\"text\".*?\/>)/i';
        $markup = preg_replace( $pattern, '${1}<button class="aws-icon"></button>', $markup );
        return $markup;
    }
Viewing 1 replies (of 1 total)
  • The topic ‘image submit button’ is closed to new replies.