Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Customize Display number of posts › Reply To: Customize Display number of posts
Hi,
Thank you for all the information, it helps a lot!
With a bit of custom code some of this might be possible. The easiest one is to center the text with the images, for that all you need is this cusomt CSS:
.asp_content .asp_res_url {
padding-top: 10px !important;
}
With that, to put the number of affected post to the descripion, the below custom code will do the trick. Try adding this code to the functions.php file in your theme/child theme directory – make sure to have a full server back-up first for safety. For more details you can check the safe coding guidelines.
add_filter('asp_results', 'asp_change_term_count');
function asp_change_term_count($results) {
foreach($results as $k=>&$r){
if ( isset($r->taxonomy) ) {
$term = get_term_by('id', $r->id, $r->taxonomy);
if ( $term->count > 1 ) {
$v->content = $term->count ." Gustscheine";
} else {
$v->content = "Ein Gustscheine";
}
}
}
return $results;
}
The results page images is a bit more complicated thing, it may need custom coding for your theme. The plugin tries to change the result images for the results page, but many times they are requested from the WordPress core, and generally taxonoym terms do not belong to the results page, so WordPress simply returns an empty string as if there is no image.
The only way to get by that is by changing the theme source, and trying to implement the plugins theme functions to fetch the original image. I only recommend starting with this if you have extensive programming knowledge, otherwise it is better to ask a developer to do it.