Skip to:
Content
Pages
Categories
Search
Top
Bottom

Splash Start


  • elaineskapetis
    Participant

    @elaineskapetis

    I’m trying to make a no-user-logged start site with Toutorials videos and somethings like this.
    I wrote

    Code:
    ( is_user_logged_in() )

    I get my normal content

    Code:
    else

    I get the splash with Videos,Connect or Sign up

    But the problem is that I have to write

    Code:
    if ( is_user_logged_in() )

    and when is register page I get the normal content.I was trying something like this

    Code:
    if ( is_user_logged_in() ) || is_page(‘register’)

    ,but unfortunately nothing.

    somebody knows what I make wrong?

    Thanks

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

  • r-a-y
    Keymaster

    @r-a-y

    What would be better is if you created a page with video and tutorials, then you could use something like this:
    https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/how-to-make-a-private-community/?topic_page=3&num=15#post-44729

    Just change bp_core_redirect() to the page you want to redirect your users to if they’re not logged in.


    elaineskapetis
    Participant

    @elaineskapetis

    Thank’s ray
    I gonna try. ;)


    elaineskapetis
    Participant

    @elaineskapetis

    Let’s see if I understood.
    I have to use

    if (!is_user_logged_in() ){
    bp_core_redirect( $bp->root_domain.’/register’ );
    }

    than I can redirect my user to register page and ther could I put some Videos?
    Do I have to make this to all pages that I don’t wanna show to not logged in users?


    elaineskapetis
    Participant

    @elaineskapetis

    It works now ;)
    I use the code from @Travel-Junkie
    by Functions:
    function sh_walled_garden()
    {
    global $bp;

    if ( bp_is_register_page() || bp_is_activation_page() )
    return;

    if( ! is_user_logged_in() )
    bp_core_redirect( $bp->root_domain .’/’. BP_REGISTER_SLUG );
    }
    add_action( ‘get_header’, ‘sh_walled_garden’ );

    and by header:
    do_action( ‘sh_walled_garden’ )

    Now I gonna make some changes by Register.

    Thanks a lot @ray and @Travel-Junkie
    ;)


    r-a-y
    Keymaster

    @r-a-y

    @ElaineSkapetis – you actually don’t need the “do_action( ’sh_walled_garden’ )” line in header.php!

    Glad you figured it out.


    hibuddie9ja
    Member

    @hibuddie9ja

    pls can somone help with a tutorial or a guide line on how i can make a splash front page look of my site like the following sites listed below which is facebook.com splash page, netlog.com or tagged splash…


    aces
    Participant

    @aces

    Things have changed since 18 months ago so it would be better to start a new topic.

    If you are interested in the walled garden privacy technique then for a much more recent discussion have a look here

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Splash Start’ is closed to new replies.
Skip to toolbar