Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter kechang

    (@kechang)

    anyone?

    Try styling it. The search box is: #searchform and the submit button is #searchform s or something like that. Do a display: inline.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    kechang: Your blog does not appear to be actually using widgets, as far as I can tell. Are you sure that you are using widgets?

    Try editing your sidebar.php file in your theme instead.

    Thread Starter kechang

    (@kechang)

    Yup, i am using widgets, that’s how the flickr photos got there.

    https://www.kevchang.com/journal is my blog.

    as soon as I uninstalled widgets, the search box went back to the way I wanted. I know that widget changed the search form by default as seen on many sites.

    I just need to know which file to edit. Definitely not sidebar.php and changing widget.php does not seem to do anything.

    kechang: Your blog does not appear to be actually using widgets, as far as I can tell. Are you sure that you are using widgets?

    Try editing your sidebar.php file in your theme instead.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    Oh. I thought your blog was that managedtasks one you posted above.

    You don’t appear to have a search box on your page at all. Have you dragged the search box widget into the sidebar yet?

    As for which file to edit, well, that really depends on what the actual problem is. The default widget search box is indeed built into the widgets.php file, however it could have been replaced by the theme or anything else. Without actually seeing the problem, it’s difficult to say what the issue is.

    Thread Starter kechang

    (@kechang)

    Thanks for your reply, I will try to make it more clearer to avoid multiple replies.

    1)I took off the search box because the default widget search box is really annoying me. I just put it back now FYR.

    2) I am using the default wordpress theme, what you see right now is before any modification to sidebar.php or widgets.php in regards to the search box.

    I hope someone is able to look at the code and perhaps shed some light? I hope this clears up your concerns.

    Thanks for trying to help Otto42! appreciated.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    Your problem isn’t in the code, it’s in your style.

    Open your stylesheet and find this:

    #searchform {
    	margin: 10px auto;
    	padding: 5px 3px;
    	text-align:center;
    	}

    Change it to something like this:

    #searchform {
    	margin: 10px auto;
    	padding: 0px;
    	}

    You may need to fiddle with it in different browsers and such until you like it all around.

    Thread Starter kechang

    (@kechang)

    you are the BEST! how could I have missed that. Thanks man!

    Wow, missed my response completely. ??

    Can someone please clarify the solution for this topic.

    I’m using wordpress 2.2, I’ve edited my stylesheet from

    #searchform {
    margin: 10px auto;
    padding: 5px 3px;
    text-align:center;
    }

    to

    #searchform {
    margin: 10px auto;
    padding: 0px;
    }

    … but the search BUTTON is still not on the same line as the search BOX

    I have search the forum, and even contacted the thread author, kechang; but he can’t seem to remember everything he did to get the desired result, and the changes above must only be 1/2 of the battle.

    Thanks everyone, any help is appreciated!

    If you guys are trying to get the search widget to look more like the “default style” search form (i.e. search button to the right of the input box on the same line), one way is to make a super tiny edit in the widget template file.

    In the wp-includes folder, open widgets.php and look for the wp_widget_search function definition block (around line 405 or so). Within the definition block, look for this line:

    <input type="text" name="s" id="s" size="15" /><br />

    Remove the linebreak (<br />), save, refresh your browser, and the submit button should now be to the right of the input box a-la the default theme.

    thanks, i had the same problem. those widgets are a nice addition, but are not very flexible. I would’ve tought each widget would have its own file, it would be more intuitive.

    Yes, defining the individual widgets in separate files would have been nice.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Modify Widget Search Box’ is closed to new replies.