我是OSClass的新用户。此代码从oc-content\themes\modern\inc.search.php
,在OSClass的搜索栏中添加地点搜索选项
<form action="<?php echo osc_base_url(true); ?>" method="get" class="search" onsubmit="javascript:return doSearch();">
<input type="hidden" name="page" value="search" />
<fieldset class="main">
<input type="text" name="sPattern" id="query" value="<?php echo osc_esc_html((osc_search_pattern() != '') ? osc_search_pattern() : $sQuery); ?>" />
<?php if (osc_count_categories()) { ?>
<?php osc_categories_select('sCategory', null, __('Select a category', 'modern')); ?>
<?php } ?>
<button type="submit"><?php _e('Search', 'modern'); ?></button>
</fieldset>
<div id="search-example"></div>
</form>
在这里,我需要添加一个选项来搜索。那就是地方,与#查询相同。我能做什么?
在哪里我可以改变(s)好工作,以此搜索?
我知道下面的代码,
<input type="text" name="sCity" id="sCity" value="<?php _e('Enter your city here'); ?>" />
认为我们给的结果类似以下,
但是,我的要求是sCity
也一样sPattern
。请参阅两者中的value
。 sPattern在重定向时显示相同的结果。但sCity不会。我需要它。
抱歉不好英语。 – KarSho 2013-03-08 09:31:20