2011-01-11 72 views
-1

我把搜索小部件放在我的網站(默認的WordPress 3.0.4)。默認的輸出將是WP:覆蓋搜索小部件

<form action="http://alessandro.host/" id="searchform" method="get" role="search"> 
    <div><label for="s" class="screen-reader-text">Search for:</label> 
    <input type="text" id="s" name="s" value=""> 
    <input type="submit" value="Search" id="searchsubmit"> 
    </div> 
</form> 

現在我想重寫,使輸出會是這樣

<form action="http://alessandro.host/" id="searchform" method="get" role="search"> 
    <div> 
    <input type="text" id="s" name="s" value="Search"> 
    </div> 
</form> 

公告不存在labelsend button

我怎麼能做到嗎?

+0

您想知道模板在哪裏編輯? – Jonah 2011-01-11 04:09:06

回答

3

您需要將search.php重命名爲searchform.php並將其放置在主題文件夾中。 WordPress首先檢查當前主題文件夾中的文件,如果未找到,則顯示默認模板。

我認爲你需要thisthis

它描述了兩種方式,添加您的模板或覆蓋基本的搜索表單/標準。

快樂編碼