• Resolved peter8nss

    (@peter8nss)


    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)
  • Plugin Support Kim L

    (@kimmyx)

    Hi @peter8nss,

    That is very unusual behavior since search results are displayed in an archive page.

    Could you send us a screenshot of your full restriction settings?

    If you prefer to share it privately, you may send us a message here: Contact – Code Atlantic

    We’ll wait for your message. 🙂

Viewing 1 replies (of 1 total)

The topic ‘Redirect when search results empty’ is closed to new replies.