Redirect when search results empty
-
I have a content control restriction:
- Who can see: Logged in users
- Protection: Redirect
- Content: Is not….
To prevent users who are not logged in from seeing some content. When I run a search which has results that is displayed fine. But when the search returns no content, the redirect fires – which I wasn’t expecting.
Should there be additional code in the “template_redirect” function to just return in the case that global $post is null – as there is “no content” to check in this case?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Redirect when search results empty’ is closed to new replies.