我的search.php文件提及到的函数调用:WordPress的搜索 - Get_Template_Part
<?php
/* Run the loop for the search to output the results.
* If you want to overload this in a child theme then include a file
* called loop-search.php and that will be used instead.
*/
get_template_part('loop', 'search');
?>
所有似乎很好地工作带回我的搜索结果,但我也想显示我的侧边栏和页脚部分但是这个get_template_part似乎覆盖了它。
任何想法如何在search.php文件结果页中仍然显示我的侧栏和页脚信息?
它似乎有它自己的div部分,因为我的侧边栏显示在结果集的上方或下方。
谢谢。
嗨@Todd,不知道该如何这涉及到我的查询用在我的search.php中的文件里面,我也希望这个页面来显示我的两个侧边栏和页脚信息使用get_sidebar并与结果一起get_footer搜索过程。目前,我似乎无法同时使用侧边栏和get_template_part()。谢谢。 – tonyf 2010-09-18 00:02:27