Social Stream takes your latest posts from Twitter, Facebook and your WordPress blog to merge them into a single feed. This can be displayed anywhere on your site with a shortcode or series of helper PHP functions.
- How do I disable Twitter, Facebook or WordPress posts from showing in Social Stream
Easy! Just don’t populate the relevant fields in the settings and it’ll be excluded automatically.
- How do I display Social Stream on my website
There are a few ways you can do this. The easiest way is through a shortcode:
Place this anywhere you want the stream to be shown in your CMS and it’ll pull it out using Ajax. If you prefer to pull things out in your theme then that’s possible too:
<?php the_social_stream() ?>– Will pull out the Social Stream in HTML.
<?php ajax_social_stream() ?>– Recommended: This will use Ajax to display the social stream which is advantageous due to load speeds.
<?php get_social_stream() ?>– Pulls out an array of all the posts so you choose how you want to display it.
- How can I override the default theme?
Copy the file
views/social_stream.phpfrom the plugin to the root of your theme and style as desired.
- What if I just want to pull out Twitter or Facebook posts?
There are a couple of functions that will allow you to pull out an array of Twitter or Facebook posts on their own.
<?php twitter_posts($numberOfPosts) ?>– Will return an array of Twitter posts
<?php facebook_posts($numberOfPosts) ?>– Will return an array of Facebook posts
- How do I determine what type of post this is?
We’ve included a couple of functions that will return a true/false so you can easily work out if it’s a Twitter or Facebok post.
is_twitter_post($post)– Pass in a post to check
is_facebook_post($post)– Pass in a post to check
- I want to parse links, @replies and hashtags, how can I do this?
You don’t need to roll your own regex as we’ve included a couple of static methods on the relevant classes.
<?php SS_Twitter::parse($postText) ?> - Will return the tweet with links, hashtags and @replies parsed <?php SS_Facebook::parse($postText) ?> - Will return the post with links parsed
- Who made this?
- Fixed issue that caused posts to always display at the bottom of the stream
- We made it to 1.0!