WordPress CMS的搜索功能

时间:2010-08-21 04:05:15

标签: wordpress search content-management-system wordpress-plugin

我需要在我正在开发的WordPress CMS网站中加入“搜索”功能,并希望将此功能/插件附加到以下代码中,并且不确定如何在WordPress中执行此操作,即:

            <div id="search_box">
              <form method="get" action="/search" id="form">
                <input name="white_box" type="text" class="search" value="Search site" size="19" maxlength="80" id="white_box" onfocus="if (this.value=='Search site') this.value = ''"/>
                <input name="submit" type="image" class="submit" value="submit" src="images/search_btn.jpg" />
              </form>
            </div>

我基本上想在我的网站上加入“搜索”功能。

任何帮助都会很棒。

感谢。

2 个答案:

答案 0 :(得分:4)

@Tonsils你可以使用以下任何一种随时可用的WordPress插件取决于你的要求......

使用Relevanssi插件进行多语言支持 http://wordpress.org/extend/plugins/relevanssi/

使用WPSearch进行良好的自定义搜索 http://wordpress.org/extend/plugins/wpsearch/

对所有类型的内容搜索使用Search-Everything http://wordpress.org/extend/plugins/search-everything/

答案 1 :(得分:0)

这是一个非常基本的WordPress搜索表单。请参阅表单操作网址的不同之处?

<form method="get" id="searchform" action="<?php bloginfo('home'); ?>/">
   <input type="text" size="14" value="<?php echo wp_specialchars($s, 1); ?>" name="s" id="s" class="s" />
   <input type="submit" id="searchsubmit" value="<?php _e('GO'); ?>" />
</form>
相关问题