Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to redirect to home_url() if user is not logged in


  • tjbrewers
    Participant

    @tjbrewers

    What’s the best way to redirect to the home_url() if the user is not logged in? I’m using WP 3.3.1 and BP 1.5.3.1.

    I tried adding a function, that contained bp_core_redirect(), to get_header, i.e. add_action(‘get_header’, ‘my_function’);. But that gives me this warning: Cannot modify header information – headers already sent by (output started at /home/livinghm/public_html/wp-content/themes/gratitude/groups/index.php:12) in /home/livinghm/public_html/wp-includes/pluggable.php on line 866.

    Using the plugin BuddyPress Private Community gives me an error as well.

    Help is much appreciated. Thank you, Tonya

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘How to redirect to home_url() if user is not logged in’ is closed to new replies.
Skip to toolbar