Skip to:
Content
Pages
Categories
Search
Top
Bottom

config file

  • @albertoshu

    Member

    Hi,

    I am trying to change the URL where non-loggedin users are being redirected. To do this i did:

    1. Add the next code to function.php:


    function redirect_nonloggedin_users($current_uri, $redirect_to) {
    // Redirect users to the homepage
    // Caution! Exclude the homepage from ‘Private BuddyPress’ options
    // to avoid redirection loops!
    return get_option(‘siteurl’) . ‘/?from=’ . $redirect_to;
    }

    add_filter(‘pbp_redirect_login_page’, ‘redirect_nonloggedin_users’, 10, 2).


    2. Create the file:”C:xampphtdocspruebawp-contentpluginsbuddypress-private-community-configmm-buddypress-private-community-config.php”
    with the next content:

    MM_BUDDYPRESS_PRIVATE_COMMUNITY::$WP_SUB_FOLDER = ‘prueba’;
    MM_BUDDYPRESS_PRIVATE_COMMUNITY::$ALLOWED_URIS = Array(‘/contacts’, ‘/about’, ‘/welcome’, ‘/pagina-ejemplo’);
    MM_BUDDYPRESS_PRIVATE_COMMUNITY::$REDIRECT_TO_URL = site_url(‘pagina-ejemplo’);

    However, it seems not consider de config file altought i think i have saved it in the correct directory.

    Any clues?

    thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘config file’ is closed to new replies.
Skip to toolbar