bstat Search Cloud

Casey over at MaisonBisson has developed a sweet WordPress plugin called bstat. I’ve been using it since I installed WordPress as my blog. Well, one thing that is missing from the plugin that I decided I wanted was a search cloud (like a tag cloud, only for incoming searches)… I recently created a tag cloud on MasterWish so decided to use that. Here’s the function.

Special Functions

  • bstat_search_cloud

Usage:

bstat_search_cloud(post_id, maxresults, days, starting_font_size);

  • post_id is the post_id for the story, usually provided by a WP variable. A value of 0 is used for grabbing all search terms from any post
  • maxresults is the number of search terms you wish to retrieve
  • days is the number of days back to look
  • starting_font_size is the starting font size of the smallest search term

Example:


<h3>All incoming search terms for this post</h3>
<small>< ?php bstat_search_cloud(0,50); ?></small>