Primary

API

search_live()

Use the function search_live() to render a Search Live form in templates.

This function accepts one optional parameter. You can pass it an array of settings equivalent to those that can be provided with the shortcode. For available settings, please refer to the Shortcodes section. The names of the shortcode attributes are accepted as the indexes of the array passed to the function.

To output the Search Live form using the default settings:

<?php
  if ( function_exists( 'search_live' ) ) {
    echo search_live() );
  }
?>

To output the Search Live form and allow for up to 30 results to be shown with descriptions and without thumbnails :

<?php
  if ( function_exists( 'search_live' ) ) {
    echo search_live( array( 
        'limit' => 30,
        'show_description' => 'yes',
        'thumbnails' => 'no'
    ) );
  }
?>