There are occasions when looking out a WordPress weblog, you solely get one merchandise within the outcome. Relying on how organized your web site is, this needs to be the merchandise the person was searching for in any case. One in every of our customers requested if there was a strategy to redirect to the publish if the search question outcomes just one match. On this article, we’re going to present you tips on how to redirect customers to the publish when the search question solely returns one match.
All it’s important to do is open your theme’s capabilities.php file and paste the next snippet.
Now it’s essential to beware that some customers is not going to count on this performance. So it might freak them out.
You May Also Like : How to Create Advanced Search Form in WordPress for Custom Post Types
If you liked this article, make sure to hit the bell for getting our latest updates and share this article with your friends in every social media platforms.