Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • in reply to: Home Register #120813
     lux007
    Participant

    Can also use this code to redirect members already logged in:

    COPY CODE
    /* Redirect to Profile if Loggedin */
    add_action( 'template_redirect', 'redirect_to_specific_page2' );
    function redirect_to_specific_page2() {
    if ( is_page('PAGEIDHERE') && is_user_logged_in () ) {
        $current_user = wp_get_current_user();
    	$profileurl = $current_user->user_login;
    wp_redirect( 'https://www.domain.com/members/'.$profileurl.'/profile/', 301 ); 
      exit;
        }
    }

    1. Enter the Home Register page’s ID above.

    2. The URL can be adjusted to whatever you want them redirect to. The above redirects them to their profile.

    in reply to: Home Register #120799
     lux007
    Participant

    Here is a solution that will help everyone.

    1. Create a page named – “Reg”, which will create http://www.domain.com/reg/

    2. Set the “Reg” page as the registration page under Buddy Press settings.

    3. Create the page “Home Register”, if already created then skip this step.

    4. When under pages, hover over the edit link for the “Home Register” page and get the page ID.

    5. Open your “Child-themes” functions.php file and enter the following code:

    COPY CODE
    /* Redirect Registration Page */
    add_action( 'template_redirect', 'redirect_to_specific_page' );
    function redirect_to_specific_page() {
    if ( is_page('IDHERE') ) {
    
    wp_redirect( 'https://www.domain.com/register/', 301 ); 
      exit;
        }
    }

    6. Update the code with the page’s ID and the URL to which you want it to redirect to. No need to edit the registration.php or other files.

    7. Enjoy 😛

    in reply to: Site-Wide & Friends-Only Acitivty Shortcode? #102329
     lux007
    Participant

    Thanks! Here is the code for those that are looking to duplicate the demo site:

    COPY CODE
    [vc_row][vc_column width="1/1"][vc_column_text css_animation="right-to-left"]
    <h3 style="text-align: center;">Latest Site Activity</h3>
    [/vc_column_text][kleo_gap size="20px"][/vc_column][/vc_row][vc_row][vc_column width="1/2"][vc_column_text css_animation="right-to-left"]
    <h4 style="text-align: center;">Groups</h4>
    [/vc_column_text][kleo_divider type="long" position="center" icon="asterisk"][kleo_bp_activity_stream number="6" show_button="yes" button_label="View All Activity" button_link="/activity" show="groups"][/vc_column][vc_column width="1/2"][vc_column_text css_animation="right-to-left"]
    <h4 style="text-align: center;">Friends</h4>
    [/vc_column_text][kleo_divider type="long" position="center" icon="asterisk"][kleo_bp_activity_stream number="6" show_button="yes" button_label="View All Activity" button_link="/activity" show="friends"][/vc_column][/vc_row]
     lux007
    Participant
    COPY CODE
    <section style="background-image: url(http://www.domain.com/images/image.jpg);background-position: center center;background-repeat: no-repeat;background-attachment: scroll;background-size: cover;padding-top: 300px;padding-bottom: 60px;min-height: 0.04px" data-prlx-speed="0.04" class="container-wrap main-color bg-parallax  text-center"><div class="section-container container"><div class="row">
    	<div class="col-sm-12 wpb_column column_container">
    		<div class="wpb_wrapper">
    			
    	<div class="kleo_text_column wpb_content_element ">
    		<div class="wpb_wrapper">
    			<h1><span style="color: #ffffff;">EXPLORE THE PLANET</span></h1>
    
    		</div> 
    	</div> <div style="height:20px;line-height:20px;" class="kleo-gap"></div><div class="kleo-search-wrap kleo-search-form search-style-transparent"><form data-context="" action="http://www.domain.com/" id="searchform" method="get" role="search">
    		<div class="input-group">
    			<input type="text" placeholder="" value="" class="ajax_s form-control input-lg" autocomplete="off" id="s" name="s" style="opacity: 0.5;"><span class="input-group-btn"><input type="submit" class="button" id="searchsubmit" value="Search"></span></div></form><span class="kleo-ajax-search-loading"><span class="kleo-loading-icon"></span></span><div class="kleo_ajax_results" style="opacity: 0.5;"></div></div><div style="height:30px;line-height:30px;" class="kleo-gap"></div>
    <section style="" class="container-wrap main-color"><div class="section-container container"><div class="row">
    	<div class="col-sm-3 wpb_column column_container">
    		<div class="wpb_wrapper">
    			
    		</div> 
    	</div> 
    
    	<div class="col-sm-2 wpb_column column_container">
    		<div class="wpb_wrapper">
    			
    	<div class="kleo_text_column wpb_content_element ">
    		<div class="wpb_wrapper">
    			<h2 style="margin-bottom: 0; color: #fff !important;"><span data-timer="1500" class="kleo-animate-number animate-when-almost-visible number_prepared start-animation" data-number="2">2</span>.<span data-timer="1500" class="kleo-animate-number animate-when-almost-visible number_prepared start-animation" data-number="247">247</span></h2>
    <p style="color: #fff;">PORTFOLIO ITEMS</p>
    
    		</div> 
    	</div> 
    		</div> 
    	</div> 
    
    	<div class="col-sm-2 wpb_column column_container">
    		<div class="wpb_wrapper">
    			
    	<div class="kleo_text_column wpb_content_element ">
    		<div class="wpb_wrapper">
    			<h2 style="margin-bottom: 0; color: #fff !important;"><span data-timer="1500" class="kleo-animate-number animate-when-almost-visible number_prepared start-animation" data-number="158">158</span></h2>
    <p style="color: #fff;">FEATURED ARTICLES</p>
    
    		</div> 
    	</div> 
    		</div> 
    	</div> 
    
    	<div class="col-sm-2 wpb_column column_container">
    		<div class="wpb_wrapper">
    			
    	<div class="kleo_text_column wpb_content_element ">
    		<div class="wpb_wrapper">
    			<h2 style="margin-bottom: 0; color: #fff !important;"><span data-timer="1500" class="kleo-animate-number animate-when-almost-visible number_prepared start-animation" data-number="28">28</span>.<span data-timer="1500" class="kleo-animate-number animate-when-almost-visible number_prepared start-animation" data-number="731">731</span></h2>
    <p style="color: #fff;">DAILY SEARCHES</p>
    
    		</div> 
    	</div> 
    		</div> 
    	</div> 
    
    	<div class="col-sm-3 wpb_column column_container">
    		<div class="wpb_wrapper">
    			
    		</div> 
    	</div> 
    </div></div></section><!-- end section -->
    		</div> 
    	</div> 
    </div></div></section>

    I guess that’s the only way to do it… straight html.

Viewing 4 posts - 1 through 4 (of 4 total)

Log in with your credentials

Forgot your details?