• Hello,

    is it possible to have two different streams on the same website?

    On my homepage I want a stream with only 1 news, and on my news site I want a stream with 10 news. It should be the same facebook page.

    Thanks in advance!

Viewing 1 replies (of 1 total)
  • It is possible but I’m not sure how to do this in the best way,
    it would be cool for their to be a parameter like [fb_social_stream limit=”1″].
    I tried to do this but its beyond me.

    Instead I’ve hacked the plugin in a non-update safe way by changing facebook-social-stream/lib/FBSS-Shortcodes.php

    	add_shortcode('custom_fb_social_stream', array( __CLASS__, 'fb_social_stream_sc' ));
    	}
    
    	public static function fb_social_stream_sc($atts, $content, $name) {
    		if (is_page( 337 )){
    		$custom_limit =  1;
    		}
    		else {
    	 	$custom_limit = FBSS_Registry::get('stream_msg_limit');
    		}
    		$limit = $custom_limit;
    		$social = new FBSS_SocialStream;
    		$stream_data = $social->get($limit);
    
    		return $stream_data['html'];
    	}

    This is totally not recommended way to do it!
    It will break when the plugin is updated.
    You would have to change
    if (is_page( 337 ))
    to
    if(is_home())
    or
    if(is_page(YOUR PAGE ID))
    or something that returns true,
    and then you can change
    $custom_limit = 1;
    to however many posts you want to display on that page.

Viewing 1 replies (of 1 total)
  • The topic ‘Two different streams’ is closed to new replies.