Reply To: Top searches


Ernest Marcinko


Since there is no shortcode available yet for the top searches, I suggest to create a widgetized area to that location, and add the “Top searches” widget there. So your code would look like this (line 7-9):

7 <div style="margin:10px" >'.do_shortcode('[wpdreams_ajaxsearchpro id=4]').'</div>
8 <div> '.dynamic_sidebar( 'asp_top_searches_widget' ).' </div>
9 </div>';

and, you will need to initialize that widgetized area, so you need to put this code to the themes functions.php file:

 * Register an extra area for the search
function asp_top_searches_widget_area() {

	register_sidebar( array(
		'name'          => __( 'Top searches widget area'),
		'id'            => 'asp_top_searches_widget',
		'before_widget' => ”,
		'after_widget'  => ”,
		'before_title'  => ”,
		'after_title'   => ”,
	) );

add_action( 'widgets_init', 'asp_top_searches_widget_area' );

Then, this widget area should be visible on the backend (appearance->widgets menu), where you should be able to add the top searches widget now.

I don't know if this will work, but it's definitely worth a try.

Ernest Marcinko

If you like my products, don't forget to rate them on codecanyon :)