Skip to:
Content
Pages
Categories
Search
Top
Bottom

The way to make faq page visible?

  • Avatar of chestnut_jp
    chestnut_jp
    Member

    @chestnut_jp

    I am using BP 1.2.7 with WP 3.04, and checked ‘Front Page’ and ‘Registration’ in Privacy setting.
    Because of unchecked Blog pages, my buddypress is successfully protected by non-members.

    In order to promote non-members to register, however, I would like them to see some pages, such as “FAQ” that can be viewed by members when clicking on the menu link listed at the top of the HOME page.

    I know there is a sample code:
    `
    function make_blog_directory_visible($visibility) {
    global $bp;

    if ( bp_is_directory() && $bp->current_component == $bp->blogs->slug )
    return false;

    return $visibility;
    }

    add_filter(‘pbp_login_required_check’, ‘make_blog_directory_visible’);
    `

    I added the above code to functions.php to make sure how it works, but blogs directory cannot be viewed by non-members who are redirected to login page.

    At the same time, the other sample code:
    `
    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);
    `

    I also added the above to functions.php, and it works. Non-members are all redirected to HOME page.

    Here is my question.
    Does “function make_blog_directory_visible($visibility)” really work? Is there anyone who tries this?

    I know this calls buddypress function of $visibility, and there surely is a function of $visibility in buddypress codes…

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.