Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Montezuma Theme (http://forum.bytesforall.com/forumdisplay.php?f=53)
-   -   Inactive to active Search Button (http://forum.bytesforall.com/showthread.php?t=23033)

Bruno Jan 23, 2015 12:19 PM

Inactive to active Search Button
 
By default Search Button is inactive ( in Search field). I have to use "Enter" button to search website.

I think people still want to hit search button with mouse rather than "Enter" button.

I made a few changes to fix it.

First - changed searchform php from:
Code:

<form method="get" class="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>">
        <input type="text" class="field" name="s" value="<?php esc_attr( the_search_query() ); ?>" />
        <input type="submit" class="submit" name="submit" value="search" />
</form>

to
Code:

<form method="get" class="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>">
        <input type="text" class="field" name="s" value="<?php esc_attr( the_search_query() ); ?>" />
        <input type="submit" class="submit" name="submit" value="">
</form>

Next added a few lines to CSS and removed background from ".widget .searchform .field"

Code:

.widget .submit {
display: inline-block;
cursor: pointer;
margin: 0;
border: 0 solid #ddd;
border-radius: 3px;
padding: 0;
width: 26px;
height: 28px;
position: absolute;
right: 0;
top: 0;
}

.widget .searchform .field {
        width:                                        100%;
        max-width:                                300px;

}

You can see what I did here:
http://www.wood-furniture.biz/DecorTips/

I'm not a CODER. So - is it correct what I did?

Or - is there a better way to fix it?

CrouchingBruin Jan 26, 2015 03:09 PM

Hi, Bruno. I know I said in a previous post that you normally don't have to create a child theme for Montezuma, but in this case, since you are making a change to a physical theme file (searchform.php), you should create a child theme and make your changes to a copy of that file in your child theme folder. If you don't create a child theme, then the next time you install an updated version of the theme (and new versions of the theme come out pretty frequently), all of the changes you made to any physical theme files will be lost. Any changes to the virtual CSS files or virtual template files will remain intact, because those are stored in a database table. Just want to make sure you understand that, because I don't want you to wonder what happened to your changes when you update the theme.

juggledad Jan 26, 2015 05:03 PM

Quote:

I think people still want to hit search button with mouse rather than "Enter" button.
FWIW I don't. I never use the mouse to search unless hitting enter doesn't work.

Bruno Jan 28, 2015 08:08 AM

Quote:

Originally Posted by CrouchingBruin (Post 111433)
Hi, Bruno. I know I said in a previous post that you normally don't have to create a child theme for Montezuma, but in this case, since you are making a change to a physical theme file (searchform.php), you should create a child theme and make your changes to a copy of that file in your child theme folder. If you don't create a child theme, then the next time you install an updated version of the theme (and new versions of the theme come out pretty frequently), all of the changes you made to any physical theme files will be lost. Any changes to the virtual CSS files or virtual template files will remain intact, because those are stored in a database table. Just want to make sure you understand that, because I don't want you to wonder what happened to your changes when you update the theme.

Yes, you're right. I have a Child Theme.

But - Child Theme is good enough if server doesn't crush.

I always have a copy of website ( files and Databases) on my computer.

Bruno Jan 28, 2015 08:12 AM

Quote:

Originally Posted by juggledad (Post 111434)
FWIW I don't. I never use the mouse to search unless hitting enter doesn't work.


I don't use mouse to search.

But some people I know - they even don't know how to use "search" without using mouse.


All times are GMT -6. The time now is 10:37 PM.

Powered by vBulletin® Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.