When i search a qurey that doesn't exist on my site it will show a white page without any kind of statement like ''The post you are looking for not exist in this site". How can i add this ?
You MUST read the Babiato Rules before making your first post otherwise you may get permanent warning points or a permanent Ban.
Our resources on Babiato Forum are CLEAN and SAFE. So you can use them for development and testing purposes. If your are on Windows and have an antivirus that alerts you about a possible infection: Know it's a false positive because all scripts are double checked by our experts. We advise you to add Babiato to trusted sites/sources or disable your antivirus momentarily while downloading a resource. "Enjoy your presence on Babiato"
When i search a qurey that doesn't exist on my site it will show a white page without any kind of statement like ''The post you are looking for not exist in this site". How can i add this ?
When i search a qurey that doesn't exist on my site it will show a white page without any kind of statement like ''The post you are looking for not exist in this site". How can i add this ?
You can achieve this in two ways.
1. Edit the "search.php" in your WP installation. I prefer this because it offers more customization option, but be careful when editing WP files. It requires some background in HTML and a little PHP. it's easy peasy once you get the hang of it.
2. Get a plugin that will do this for you (safe), but your options are limited to what the plugin can offer. Plus extra load to your website, and some of these plugins still use old jQuery versions(render blocking) = sloooow
Other way, you can borrow googol search API to GET the alter result like what Babiato did with their search engine.Just use google
7 Best Free 404 Redirect Plugins for WordPress (2024)
Are you experiencing a lot of 404 page not found errors in WordPress? Take a look at these 7 best free 404 redirect plugins for WordPress.www.wpbeginner.com
use elementor template.When i search a qurey that doesn't exist on my site it will show a white page without any kind of statement like ''The post you are looking for not exist in this site". How can i add this ?
Using plugin can slow down site i want use alternate method
<script> (function() { var cx = 'partner-pub-xxxxxxxxxxxxxxxx:xxxxxx-xxxx'; var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true; gcse.src = 'https://cse.google.com/cse.js?cx=' + cx; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s); })(); </script> <gcse:searchresults-only></gcse:searchresults-only> |
<div class="searchbox"> <form action="https://techbrij.com/search-result" id="cse-search-box" method="get"> <div> <?php if (isset($_GET['q'])) { ?> <input type="text" name="q" size="35" id="txtGoogleSearch" placeholder="Search Here" value='<?php echo $_GET['q'] ?>' /> <?php } else {?> <input type="text" name="q" size="35" id="txtGoogleSearch" placeholder="Search Here" /> <?php } ?> </div> </form> </div> |
I know Html I can edit it but i can't understand the contains of search.php file. What should i do ?
We get it, advertisements are annoying!
However in order to keep our huge array of resources free of charge we need to generate income from ads so to use the site you will need to turn off your adblocker.
If you'd like to have an ad free experience you can become a Babiato Lover by donating as little as $5 per month. Click on the Donate menu tab for more info.