Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 504799

search.php

$
0
0

Replies: 0

Hello everyone, I’m currently using twenty sixteen theme.

If you type something in search box (eg.show), and if the keyword matches with a post in your website, it show that post off the bat.
But, if your keyword (eg. sho w) has a little conflict with the post, or that keyword include in other posts, the page “Search Results for:” shows all the relevant posts of your website.
If the keyword matches nothing, it shows “Sorry, but nothing matched your search terms. Please try again with some different keywords.”
or
“Oops! That page can’t be found”

Ok,
I would like to get my website’s users to the posts those I created. If the keywords don’t match anything, I like “Oops! That page can’t be found” . And I can make it.

What I really want is not to display “Search Results for:” page (with relevant posts) and replace with my custom page or post, if not possible, with my custom text.

In search.php file, the author said:
Run the loop for the search to output the results.
If you want to overload this in a child theme then include a file
called content-search.php and that will be used instead.

But, I don’t know how to code content-search.php file.
All I want is simple, let the theme be, but want to replace, (if not possible) remove
“Search Results for:” page (with relevant posts)

Please someone guide me, help me with this.


Viewing all articles
Browse latest Browse all 504799

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>