PHP Snippet print drupal custom search block

PHP Snippet print drupal custom search block

This code can be used to print Custom Search blocks any where you can stick PHP. Tested in Drupal 7.

#open php code

$block = block_load('custom_search_blocks','1');
$content = _block_get_renderable_array(_block_render_blocks(array($block)));      
$output = drupal_render($content);        
print $output;

#close php code