{"id":20275,"date":"2020-01-02T04:38:06","date_gmt":"2020-01-02T09:38:06","guid":{"rendered":"http:\/\/www.templatemonster.com\/help\/?p=20275"},"modified":"2020-01-02T08:53:10","modified_gmt":"2020-01-02T13:53:10","slug":"wordpress-how-to-add-a-search-form-and-edit-search-results-page","status":"publish","type":"post","link":"https:\/\/www.templatemonster.com\/help\/wordpress-how-to-add-a-search-form-and-edit-search-results-page.html","title":{"rendered":"WordPress. How to add a search form and edit search results page"},"content":{"rendered":"<p>\r\n<\/p>\r\n<p>This tutorial is going to show you how to add a search form &amp; edit search results page on your WordPress template.<\/p>\r\n<h3>How to add a search form<\/h3>\r\n<p>Log into  your WordPress admin panel and go to the left-side menu <strong>Appearance -&gt; Widgets.<\/strong><\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2012\/06\/search_results_page_2.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2012\/06\/search_results_page_2.jpg\" alt=\"\" width=\"163\" height=\"139\" class=\"alignnone size-full wp-image-20276\" \/><\/a><\/p>\r\n<ol>\r\n<li>Under the <strong>Available Widgets<\/strong>  locate a  one called <strong>Search<\/strong> (A search  form for your site) and drag  it to one of the boxes available on the right side (depends  on the particular template design)<\/li>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2012\/06\/search_results_page_1.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2012\/06\/search_results_page_1-300x171.jpg\" alt=\"\" width=\"300\" height=\"171\" class=\"alignnone size-medium wp-image-20277\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/06\/search_results_page_1-300x171.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/06\/search_results_page_1.jpg 983w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<li>When needed, specify a title for your Search form and click Save.<\/li>\r\n<li>Preview the page which has the widget position with the Search form enabled to see it there.<\/li>\r\n<\/ol>\r\n<h3>How to edit the search results page<\/h3>\r\n<ol>\r\n<li>In your WordPress admin panel go to  <strong>Appearance -&gt; Editor<\/strong>.<\/li>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2012\/06\/search_results_page_3.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2012\/06\/search_results_page_3.jpg\" alt=\"\" width=\"154\" height=\"147\" class=\"alignnone size-full wp-image-20278\" \/><\/a><\/p>\r\n<li>From the right-hand side of the Edit Themes page look for the one called <strong>Search  Results<\/strong> (serach.php) and  click on it.  The <strong>search.php<\/strong> is a template file that represents a template  that displays the search results.\r\n<p><a href=\"\/help\/wp-content\/uploads\/2012\/06\/search_results_page_4.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2012\/06\/search_results_page_4-300x120.jpg\" alt=\"\" width=\"300\" height=\"120\" class=\"alignnone size-medium wp-image-20279\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/06\/search_results_page_4-300x120.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/06\/search_results_page_4-1024x410.jpg 1024w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/06\/search_results_page_4.jpg 1258w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<\/li>\r\n<li><strong>Search  Form<\/strong> (searchform.php) you can  also select from the right side represents another template file that is  often included to the  sidebar of many themes and generates the search box form. If there isn&#8217;t one in  your theme, you can easily copy it from the Default theme. <\/li>\r\n<li>Prior to making any changes to the  code of these pages, we suggest that you copy it  and save in a file on your computer to have  for a backup copy.<\/li>\r\n<li>The way you need to customize the  search results page is totally up to you. For instance, your default search  results pages look like this:<\/li>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2012\/06\/search_results_page_5.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2012\/06\/search_results_page_5-300x229.jpg\" alt=\"\" width=\"300\" height=\"229\" class=\"alignnone size-medium wp-image-20280\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/06\/search_results_page_5-300x229.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/06\/search_results_page_5.jpg 934w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<li>You can look for the text you see  on this page (like: Search for,  Read More, Older Entries, Newer Entries etc) in the code by hitting <strong>Ctrl + F.<\/strong><\/li>\r\n<li>To disable  text, for example, the one that says<strong> No  comments, <\/strong>first look for the text with Ctrl + F to find the line it is in,  which is <\/br>\r\n<pre class=\"brush:php\">&lt;?php comments_popup_link('No comments', '1  comment', '% comments', 'comments-link', 'Comments are closed');  ?&gt;<\/pre>\r\n<p>    And delete it (comment it  out). <\/li>\r\n<li>    To change the number of search  results, put\r\n<pre class=\"brush:php\">&lt;?php query_posts('showposts=#'); ?&gt;<\/pre>\r\n<p>  above<\/p>\r\n<pre class=\"brush:php\"> &lt;?php if (have_posts()) : while  (have_posts()) : the_post(); ?&gt;<\/pre>\r\n<p>  where  <strong>#<\/strong> is the number of posts.<br \/>\r\n    To remove the footer sidebar,  remove &lt;?php get_footer(); ?&gt;  at  the bottom. <\/li>\r\n<li>To display  the number of results, change\r\n<pre class=\"brush:php\">&lt;h1&gt;Search for: &quot;&lt;?php the_search_query();  ?&gt;&quot;&lt;\/h1&gt;<\/pre>\r\n<p>  to<\/p>\r\n<pre class=\"brush:php\">&lt;h1&gt;Search for: &quot;&lt;?php \/*  Search Count *\/ $allsearch = &amp;new  WP_Query(&quot;s=$s&amp;showposts=-1&quot;); $key = wp_specialchars($s, 1);  $count = $allsearch-&gt;post_count; _e(''); _e('&lt;span  class=&quot;search-terms&quot;&gt;'); echo $key; _e('&lt;\/span&gt;'); _e(' \u2014  '); echo $count . ' '; _e('articles'); wp_reset_query(); ?&gt;&lt;\/h1&gt;<\/pre>\r\n<\/li>\r\n<li>Once you are done with your changes, click on Update File at the bottom to save them and try use the Search  box on your site:\r\n<p><a href=\"\/help\/wp-content\/uploads\/2012\/06\/search_results_page_6.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2012\/06\/search_results_page_6-300x213.jpg\" alt=\"\" width=\"300\" height=\"213\" class=\"alignnone size-medium wp-image-20281\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/06\/search_results_page_6-300x213.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/06\/search_results_page_6.jpg 931w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n<\/li>\r\n<\/ol>\r\n<p>Feel free to check the detailed video tutorial below:<\/p>\r\n<p><a href=\"\/help\/files\/wordpress\/wordpress_search_results_page.htm\" target=\"_blank\">WordPress. How to add a search form and edit search results page<\/a><\/p>\r\n<p>I hope you succeeded in creating a WordPress search page and now everything works great. If not, you can use professional website support to edit your WordPress page. Such service helps you to fix some bugs on your website or just support your website to function on a monthly basis.<\/p>\r\n<p><img loading=\"lazy\" src=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/03\/1200x630-2.jpg\" alt=\"\" width=\"1024\" height=\"538\" class=\"alignnone size-full wp-image-85486\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/03\/1200x630-2.jpg 1024w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/03\/1200x630-2-150x79.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/03\/1200x630-2-300x158.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/03\/1200x630-2-768x404.jpg 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\r\n<p>Whether you are a beginner or a professional, there will be times when you need help with WordPress. After the launch of the site, everybody someday needs to provide high-quality and timely technical support.<\/p>\r\n<h3>What happens without timely technical support?<\/h3>\r\n<ul>\r\n \t<li>technical errors and bugs appear on the site. This annoys users and forces them to leave you and go to competitors;<\/li>\r\n \t<li>the site is idle due to periodic hosting problems;<\/li>\r\n \t<li>goods and information about services are not updated on time;<\/li>\r\n \t<li>while competitors create new pages, banners and gather an audience, your site suffers from the unknown bug.<\/li>\r\n<\/ul>\r\n<p>We suggest relying on professionals from the <a href=\"https:\/\/www.templatemonster.com\/website-maintenance-services\/\">WordPress Website Maintenance &amp; Support from TemplateMonster<\/a> to help you with your WordPress search page and other services.\u00a0 As a comprehensive site maintenance company with 10 years of experience, we offer two tariffs, depending on the amount of work.<\/p>\r\n<h3>What are the Conditions of WordPress Website Maintenance?<\/h3>\r\n<p>By purchasing this service, you are guaranteed to get an optimized working site that is protected from hacker attacks and hacks, as well as its further support on the way to high ratings.<\/p>\r\n\r\n<p>At the same time, you don\u2019t need to worry about anything yourself. You give the &#8220;keys&#8221; of your site, the rest is the concern of specialists. Of course, as the owner, you will retain access to everything. You will also receive monthly reports on the activities of the service.<\/p>\r\n\r\n<p>Okay, you know already that our service can help you to create\/edit a WordPress search page.\u00a0 But what exactly it can do?<\/p>\r\n\r\nMain features:\r\n<ul>\r\n \t<li>Daily and weekly backups<\/li>\r\n \t<li>Structure, usability and SEO optimization<\/li>\r\n \t<li>Uninterrupted monitoring of the site 24\/7<\/li>\r\n \t<li>Speed up site performance<\/li>\r\n \t<li>Hosting with InMotion<\/li>\r\n \t<li>Site Security and Protection Package<\/li>\r\n<\/ul>\r\n<h3>What pricing plans this service has?<\/h3>\r\n<p>The Essential plan costs $289 a year and $39 a month. It allows you to forget about the routine processes of website content. Effective monitoring allows you to track problems on the site and quickly fix them.\u00a0 It is suitable for supporting small sites that have a representative function. Friendly and efficient support is available around the clock. They will help you to edit WordPress pages and customize it any time you need it.<\/p>\r\n\r\n<p>The Premium plan costs 689 dollars a year or 69 dollars a month. It is designed for a business that attracts customers via the Internet. The price includes both information support of the site, and any changes in the functionality and appearance of the project. This plan is also perfect for online stores.<\/p>\r\n\r\nIn addition, this WordPress site maintenance plan has a number of additional advantages.\r\n<ul>\r\n \t<li>Remote technical support.<\/li>\r\n \t<li>Site transfer.<\/li>\r\n \t<li>Security measures.<\/li>\r\n \t<li>Installing the theme.<\/li>\r\n \t<li>SEO consulting and basic setup.<\/li>\r\n \t<li>Integration with Google Analytics.<\/li>\r\n \t<li>WooCommerce support.<\/li>\r\n \t<li>All important plugins.<\/li>\r\n \t<li>Weekly speed optimization.<\/li>\r\n<\/ul>\r\n<h3>How to get started with the website maintenance service?<\/h3>\r\n<p>First of all, in order to become a client and take advantage of all the site support services, you should choose a plan. Then fill in three fields &#8211; email, name, and phone. Choose a payment method, and actually pay the required amount. After that check your mail.<\/p>\r\n\r\n<p>A confirmation letter will be sent to your address. And then a manager will contact you, with whom you can discuss all the nuances of your cooperation and give access to your site.<\/p>\r\n\r\n<p>That&#8217;s the whole procedure.<\/p>\r\n\r\n<p>Find out more about <a href=\"http:\/\/templatemonster.com\/blog\/manage-website-maintenance-services\/\">how to manage WordPress Website Maintenance<\/a> at our blog.<\/p>\r\n<\/p>\r\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>This tutorial  is going to show you how to add a search form &amp; edit search results page on your Wordpress  template.<\/p>\n","protected":false},"author":30,"featured_media":20284,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[728],"tags":[1303,631,2405],"_links":{"self":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/20275"}],"collection":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/users\/30"}],"replies":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/comments?post=20275"}],"version-history":[{"count":2,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/20275\/revisions"}],"predecessor-version":[{"id":85503,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/20275\/revisions\/85503"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media\/20284"}],"wp:attachment":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media?parent=20275"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/categories?post=20275"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/tags?post=20275"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}