You may have noticed that when there is only one search result then user need to click on the title of that result to read more about that post. We can use the below function to redirect user to post page when there is only one search result.
If you want to send a mail to wordpress admin when user comes to 404 page. Then you can write the below simple code in theme’s functions.php file or you can write the same in custom plugin created by you.
If you want to add a product to magento cart with price change then let me tell you that we can update product price at the time of adding product in cart in magento by using following code.
There are some many ways to redirect users/visitors in magento. But the most easy way i found is written below. You can modify the head phtml file and the redirection will be done automatically.