admin管理员组文章数量:1122846
I have problem with search in WordPress. I want to remove the "s" parameter in the URL. This is my URL:
www.example?post_type=tour&s=&tour_location=70&tour_types=116&tour_month=144&tour_year=66
I want the URL to look like:
www.example?post_type=tour&tour_location=70&tour_types=116&tour_month=144&tour_year=66
How do I need to modify my code?
I have problem with search in WordPress. I want to remove the "s" parameter in the URL. This is my URL:
www.example.com?post_type=tour&s=&tour_location=70&tour_types=116&tour_month=144&tour_year=66
I want the URL to look like:
www.example.com?post_type=tour&tour_location=70&tour_types=116&tour_month=144&tour_year=66
How do I need to modify my code?
Share Improve this question edited Jan 23, 2017 at 10:46 fergbrain 4502 silver badges7 bronze badges asked Jan 23, 2017 at 8:56 johan riyantojohan riyanto 11 Answer
Reset to default 0The "s" variable parameter is for the search term and is used when there's a search on a WordPress site.
If you have a form that users are filling out, there should be code similar to:
<input type="text" value="<?php the_search_query(); ?>" name="s" id="s" />
Delete that input tag and the "s" will disappear.
本文标签: pluginsRemove Url Parameter Wordpress
版权声明:本文标题:plugins - Remove Url Parameter Wordpress 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736294963a1929469.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论