12% off of LTD using this coupon: TWELVEPERCENTOFF. Promo ends on 2 Dec midnight UTC.
Published on Jun 6, 2019

How to set up a redirect when there are no search results in Oxygen

Sridhar Katakam

This members-only tutorial provides the steps to show the search results if there is at least one result or redirect the visitor to a specific URL when there is none on search pages in Oxygen.

We shall add a custom shortcode for this and wrap all the content in Search Results Template's Inner Content inside a Shortcode Wrapper component with our shortcode.

Step 1

Install and activate Code Snippets plugin.

Go to Snippets > Add New.

Title: Search Results

Code:

This is a premium members-only content.

To view the rest of the content, please sign up for membership ($47/month or $599 one-time).

Already a member? Log in below or here.

tagschevron-leftchevron-rightchainangle-rightangle-upangle-downfolder-omagnifiercrossmenuchevron-downarrow-right