Modify the wordpress search style

Placement surface section 份版 wordpress completed several adjustments before heaven,乎因 similar problems for the current analysis time after 來發,Will lead to the presentation of the "Search" function is a bit different,Further noted that the default search field is not too nice,Originally just want to take the "search" remove the word,Internet looked at some of the design,Using a different presentation。

Original style The modified


Add the following code in style.css

/** Search gadget **/
input#s {  
height: 22px;  
*margin: 10px 0 0 0;  
*+margin: 10px 0 0 0;  
padding: 1px;  
border:1px solid #ccc
input#searchsubmit {  
background:url(images/go.gif) no-repeat;
.box {  
.screen-reader-text {  
display: none;  

Which go.gif to throw under the directory of themes,Parameters inside can be adjusted according to demand。



In addition to changing the presentation,Arrives at a top theme column shifter side 邊欄 邊的 從右 搜尋 Wa feedback we,This part can be implemented through the following ways:


To find the syntax of the theme column,I, for one,It may

<?php wp_list_pages('depth=1&title_li='); ?>

Followed by the

<div id=&quot;right-search&quot;><?php get_search_form() ?></div>

接著開啟style.css,Add the following syntax

#right-search { margin:15px 10px 0 0; float:right; }

Layout Adjustment to follow the set value。Finished,Would this:


Change Wordpress default search gadget style | Robin

Arras Will move the search box to the Top-the Menu right side of the « WordPress 研究者日記

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.