• If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Stop wasting time looking for files and revisions. Connect your Gmail, DriveDropbox, and Slack accounts and in less than 2 minutes, Dokkio will automatically organize all your file attachments. Learn more and claim your free account.


WordPress Plugin - Displaying Data

Page history last edited by Jason Jones 11 years ago

<< Back to WordPress Plugin



Displaying Data from the Swarm API


The final step is to insert the code where you want the data to display. This can be done in a new page you create or in the footer, header, sidebar, etc. Below are a few simple code samples that you can copy and paste or just use as examples for your own edits.


The plugin operates by swapping out a specific tag with the requested HTML module. Specific tags include:

  • [sf:tweetview] - for a listing of recent tweets in the swarm from Twitter.
  • [sf:memberview] - for a listing of thumbnail images of top rated swarm members.
  • [sf:linkview] - for a listing of the most popular links within the swarm.
  • [sf:photoview] - displays the most popular images from Flickr.


Here is a sample creating a new page called "Swarm" and simply stacking all of the display modules vertically in a single div tag:




Sample Code for Copy and Paste:


  • One Column with one module:


<div id="primary">
  • One Column with all modules vertically stacked:


<div id="primary">
  • Two Column with two modules in each:
<div id="primary">
<div id="leftColumn">
<div id="rightColumn">

Onece you have put your HTML code into the page (or edited it directly into the PHP of a page), preview the page and see how your data looks. From this point, you can fine tune the HTML and CSS to your liking.


Congratulations! You now have real-time swarm data in your blog.


Have a question or suggestion? Ask Us.


<< Back to WordPress Plugin


Comments (0)

You don't have permission to comment on this page.