Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Montezuma Theme »

Inactive to active Search Button


  #1  
Old Jan 23, 2015, 01:19 PM
Bruno
 
8 posts · Jan 2015
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?
  #2  
Old Jan 26, 2015, 04:09 PM
CrouchingBruin's Avatar
CrouchingBruin
 
299 posts · Aug 2010
Santa Monica, CA
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.
__________________
My Montezuma-themed sites: ESHS Girls Basketball Team, Venice Hongwanji Buddhist Temple
Please consider making a donation to BytesForAll for their great themes!
  #3  
Old Jan 26, 2015, 06:03 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #4  
Old Jan 28, 2015, 09:08 AM
Bruno
 
8 posts · Jan 2015
Quote:
Originally Posted by CrouchingBruin
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.
  #5  
Old Jan 28, 2015, 09:12 AM
Bruno
 
8 posts · Jan 2015
Quote:
Originally Posted by juggledad
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.

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add submit button to search box? wex Header configuration & styling 1 Mar 21, 2012 03:26 PM
Search Button with Search Box in header True Header configuration & styling 4 Aug 2, 2010 04:50 PM
Search Button Cali Header configuration & styling 7 Jul 23, 2009 09:43 PM
Search box has no button soonguy Header configuration & styling 2 Feb 10, 2009 05:04 PM


All times are GMT -6. The time now is 08:17 PM.


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