• Resolved rostumus1

    (@rostumus1)


    Hi,
    Great job for this plugin (youzify).

    i’d like to know please, how to activate or display the wall activity feed with yousify. i’d like to see my contacts posts. i have to check each member for his activity?

    My second point:
    I would like the navigation to be reserved for members and keep only the home page accessible to all. so whoever is going to join will know what is about by consulting the home page. Is there a snippet or a code to insert for that?

    thank you for your help and your time

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Youzify

    (@kainelabsteam)

    Hello @rostumus1,

    Thanks for your message, happy that you liked our plugin ^^

    1. Actually, we still don’t have such a feature but if you considered using this addon below, We can create a custom code snippet for you to make a workaround with the help of the addon below to make that possible 🙂

    https://youzify.com/downloads/buddypress-moderation-plugin/

    2. Do you mean you want to make only the home page available for non-logged-in users and redirect other pages to the login page?

    You are welcome.

    Best Regards, KaineLabs Team.

    • This reply was modified 5 years ago by Youzify.
    Thread Starter rostumus1

    (@rostumus1)

    hi
    I thank you for your reponse.

    what i want is to make only the home page available for non-logged-in users and redirect other pages to the login page. yes.

    Plugin Support Youzify

    (@kainelabsteam)

    Hello @rostumus1,

    Thanks for your reply.

    You can use this snippet below:

    <?php
    function yzc_redirect_all_site_to_login_page_except_home_page() {
    
        if ( is_user_logged_in() || 'off' == get_option( 'youzify_activate_membership_system' ) ) {
            return;
        }
    
        if ( is_home() || is_front_page() ) {
            return;
        }
    
        if ( ! youzify_is_membership_page( 'login' ) && ! bp_is_register_page() && ! youzify_is_membership_page( 'lost-password' ) && ! bp_is_activation_page() ) {
            $login_page = youzify_membership_page_url( 'login' );
            wp_safe_redirect( $login_page );
            exit();
        }
    
    }
    
    add_action( 'template_redirect', 'yzc_redirect_all_site_to_login_page_except_home_page' );

    Let me know if it worked fine for you 🙂

    Best Regards, KaineLabs Team.

    Thread Starter rostumus1

    (@rostumus1)

    Hi, unfortunately it doesn’t work.
    the slug i use for the login page is “se-connecter”.
    i find alosi this suggestion but it’s for limiting the access to certain pages, posts or category.

    /*
    * Restrict non logged users to certain pages
    */

    add_action(‘template_redirect’,’my_non_logged_redirect’);
    function my_non_logged_redirect()
    {
    if ((in_category(1) && !is_user_logged_in() ))
    {
    wp_redirect( ‘http://mysites.com/loginpage/&#8217; );
    die();
    }
    }`

    how can i define “all site” instead of “in_category(1) and keep your condition
    if ( is_home() || is_front_page() ) {
    return;
    }

    Plugin Support Youzify

    (@kainelabsteam)

    Hello @rostumus1,

    Thanks for your reply.

    Please send me your login page URL, and I will edit the snippet for you 🙂

    Best Regards, KaineLabs Team.

    Thread Starter rostumus1

    (@rostumus1)

    i work on localhost for the moment.
    i found a plugin for that. thank you for your help 🙂

    Plugin Support Youzify

    (@kainelabsteam)

    Ah! No worries, we are happy that you resolved the problem.

    Have a great day ^^

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Display walla activity feed’ is closed to new replies.