我有我的WordPress 3.1的网站中添加的,在我的sidebar.php文件的底部下面的代码:WordPress的搜索查询
<div id="search_box">
<form id="searchform" action="http://www.service.com/" method="get" role="search">
<input id="s" type="text" name="s" class="search" value="Search site" size="19" maxlength="80" id="white_box" onfocus="if (this.value=='Search site') this.value = ''"/>
<input id="searchsubmit" type="image" class="submit" value="submit" src="<?php bloginfo('template_url'); ?>/images/search_btn.jpg" />
</form>
</div>
正如我已经编写这个搜索过程中我自己,当我放置一些文本在我的搜索文本框中按“搜索”按钮,它看起来好像是在我的主题中调用页面search.php并显示结果。
问题:
1)其中,/它是如何知道我什么时候按下“搜索”按钮熄灭,打电话的search.php?
2)如果可能的话而已,我能怎样改变调用不同的php文件代替的search.php
感谢。
在load_template()之后退出并不好,因为加载模板后可能无法使用钩子。 – rbncha 2012-08-10 11:57:48