Skip to content

Instantly share code, notes, and snippets.

@ajaydsouza
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ajaydsouza/c5f76de1a3d679847602 to your computer and use it in GitHub Desktop.
Save ajaydsouza/c5f76de1a3d679847602 to your computer and use it in GitHub Desktop.
get_bsearch_heatmap example
<?php if function_exists( 'get_bsearch_heatmap' ) {
$args = array(
'daily' => FALSE,
'smallest' => '10', // Heatmap - Smallest Font Size
'largest' => '20', // Heatmap - Largest Font Size
'unit' => 'pt', // Heatmap - We'll use pt for font size
'cold' => 'ccc', // Heatmap - cold searches
'hot' => '000', // Heatmap - hot searches
'before' => '', // Heatmap - Display before each search term
'after' => '&nbsp;', // Heatmap - Display after each search term
'heatmap_limit' => '30', // Heatmap - Maximum number of searches to display in heatmap
'daily_range' => '7', // Daily Popular will contain posts of how many days?
); // All these parameters are optional. If you don't pass any of these, the plugin will default to the options set in the Better Search settings page
echo get_bsearch_heatmap( $args );
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment