This topic has 3 replies, 3 voices, and was last updated 11 years by SQadmin.

  • Author
  • #1080
     AKG86
    Participant

    Can it be done that when a user searches using the table on the front page and then instead of just going straight to the members page it asks you to sign up?

    #1093
     SQadmin
    Keymaster

    Hi,
    You can modify members/index.php template somewhere around line 72 and make a condition to show the members loop, something like this:

    COPY CODE
    
     <?php 
    if ( is_user_logged_in() ) {
    locate_template( array( 'members/members-loop.php' ), true ); 
    }
    else
    {
    //other content for non-logged in users
    }
    ?>
    

    Hope it helps

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #1125
     jaybini
    Participant

    yea i wanted this feature
    what do i write in the “other content for non-logged in users” , so it can pop-up the login window ?

    #1139
     SQadmin
    Keymaster

    You can put the buttons from header:

    COPY CODE
    
    
                <?php if (function_exists('bp_is_active')): ?>
                <li class="relative"><a href="<?php bp_loggedin_user_link(); ?>" class="tiny secondary button radius"><i class="icon-user hide-for-medium-down"></i> <?php _e("PROFILE", 'kleo_framework'); ?></a><div class="kleo-notifications"><?php if( bp_is_active('messages') && messages_get_unread_count() > 0 ) { ?><a href="<? echo bp_loggedin_user_domain().'messages/'; ?>" data-width="210" title="<?php _e("New messages", 'kleo_framework');?>" class="kleo-message-count has-tip tip-left"><?php echo messages_get_unread_count(); ?></a><?php } ?><?php if (bp_is_active('friends') && bp_friend_get_total_requests_count() > 0): ?> <a href="<? echo bp_loggedin_user_domain().'friends/requests'; ?>" data-width="210" title="<?php _e("Friend requests", 'kleo_framework');?>" class="kleo-friends-req has-tip tip-right"><?php echo bp_friend_get_total_requests_count(); ?></a><?php endif; ?> </div></li>
                <?php endif; ?>
            <li><a href="<?php echo wp_logout_url(get_bloginfo('url')); ?> " class="tiny button radius"><i class="icon-off hide-for-medium-down"></i> <?php _e("LOG OUT", 'kleo_framework'); ?></a></li>
            <?php else: ?>
            <li><a href="#" data-reveal-id="login_panel" class="tiny secondary button radius"><i class="icon-user hide-for-medium-down"></i> <?php _e("LOG IN", 'kleo_framework'); ?></a></li>
            <?php if(get_option('users_can_register')) { ?>
                <li><a href="#" data-reveal-id="register_panel" class="tiny button radius"><i class="icon-group hide-for-medium-down"></i> <?php _e("SIGN UP", 'kleo_framework'); ?></a></li>
            <?php } ?>
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 4 posts - 1 through 4 (of 4 total)

The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?