. .
ShallHelp

×


| Home | home
| Consumers |
| Quote |
| Licensed Professionals |
| Clients |

| EXPLORE |
| Community / Forum |
| Articles / Blogs |
| Members Chat |

| MY ACCOUNT | person
| Sign In or Register |
| Missions |
| Tech Team |

Module: Search Page

I configured the “Search” to only search Blog Posts.  (For privacy issues, I don’t want other confidential pages to get searched).  Here’s the code I used below:

<form class=”search-form” role=”search” action=”https://www.shallhelp.com/blog/” method=”get”><label><span class=”screen-reader-text”>Search for:</span><input class=”search-field” name=”s” type=”search” value=”” placeholder=”Search Blog …” /> </label><input class=”search-submit” type=”submit” value=”Search” /></form>

Here’s how it looks like.  Try it doing a search on the keyword “TestPage” (it will only return this “Module:Search Page” blog post” (because that keyword is in the content of this blog post), but not the actual “TestPage” page itself.  (Yes, there is one here!  Type the website, then forward slash “/” then type “TestPage”, then press the enter key – then you will see the page)   :

You can also see this Search Box on the footer, I just added it.

Updated: 8/13/2020 7:51PM – I changed some Core Codes from THIS

<?php
get_search_form();
?>

TO THIS

<form class=”search-form” role=”search” action=”/blog/” method=”get”><label><span class=”screen-reader-text”>Search for:</span><input class=”search-field” name=”s” type=”search” value=”” placeholder=”Search Blog …” /> </label><input class=”search-submit” type=”submit” value=”Search” /></form>

#CodeSnippets

2 thoughts on “Module: Search Page

Comments are closed.