imanicogic (@imanicogic)

Forum Replies Created

Viewing 1 replies (of 1 total)

  • imanicogic
    Participant

    @imanicogic

    Hello Support,

    http://www.imanicogic.com
    Wordpress Version:4.7.5
    BBPress Version: 2.5.12

    This was tried on other themes and our WordPress Developer encouraged us to submit this to you.
    ==========================
    We are trying to redirect Members, Groups, and Activity pages to a custom URL. We are using the following code:

    function church_bp_page_template_redirect()
    {

    if( ! is_user_logged_in() && ! bp_is_activation_page() && ! bp_is_register_page() && (bp_is_current_component(‘members’) bp_is_current_component(‘activity’) bp_is_current_component(‘groups’))) {
    wp_redirect( ‘/imani-secured-login/’ );
    exit();
    }
    }

    add_action( ‘template_redirect’, ‘church_bp_page_template_redirect’,10 );

    However, when BBPress is active, this will not work and will always redirecting to Homepage but if BBPress is activated, the custom code will work perfectly.

    Can you please check if there are any conflicts with Buddypress and BBPress in regards to template_redirect?

    Thanks!

Viewing 1 replies (of 1 total)