Plugin Author
TC.K
(@wp_dummy)
Yes, you can.
If you are using default search template , then you can directly customize your search.php in your theme.
For ajax result template, you can use uwpqsf_result_tempt filter to customize the result. You can refer this post.
Thread Starter
tbare
(@tbare)
That’s great! Is there a way to specify multiple result templates, and specify which template to use int he shortcode?
Basically, I have multiple custom post types with specific fields based on the type, and those fields in the results – I’d love to be able to style the search results just like the archive page for each custom type.
Plugin Author
TC.K
(@wp_dummy)
Nope, but you can implement it in the filter function:
function customize_output($results , $arg, $id, $getdata ){
// The Query
$apiclass = new uwpqsfprocess();
$query = new WP_Query( $arg );
ob_start(); $result = '';
// The Loop
if ( $query->have_posts() ) {
while ( $query->have_posts() ) {
$query->the_post();global $post;
if($id == '123'){
//include template for form 123
}elseif($id == '234'){
//include template for form 234
}elseif ....
}
echo $apiclass->ajax_pagination($arg['paged'],$query->max_num_pages, 4, $id, $getdata);
} else {
echo 'no post found';
}
/* Restore original Post Data */
wp_reset_postdata();
$results = ob_get_clean();
return $results;
}
You can use $id to identify the form, or use get_post_type($post->ID) for identify identify post’s post type in the while loop.
Is there a way set the search to show current day posts automatically, on page load?
Plugin Author
TC.K
(@wp_dummy)
This thread was remark as solved. Please open a new topic instead.