Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Search results problem
This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko 4 years, 2 months ago.
- AuthorPosts
- January 17, 2019 at 10:15 pm #20828
Hello,
After the last update appears a problem on showing results.
http://www.dezio.it/oli-essenziali/Before the update I used this code in functions.php to print:
– thumbnail
– title on the page
– botanical name (post_tag)just these 3 elements.
//Code
add_filter( ‘asp_results’, ‘asp_add_tags_to_content’, 1, 1 );
function asp_add_tags_to_content( $results ) {
$taxonomy = “post_tag”;foreach ($results as $k=>$v) {
if ( $v->content_type != ‘pagepost’) continue;// Get the post terms
$post_terms = wp_get_object_terms( $results[$k]->id, $taxonomy );
$cats = array();
if ( !empty($post_terms) && !is_wp_error($post_terms) ) {
// Concatenate category names to the $cats variable
foreach($post_terms as $c){
$cats[] = $c->name;
}
}// Modify the post title
if ( !empty($cats) )
$results[$k]->content .= “Nome Botanico: “.implode(‘, ‘, $cats);
}return $results;
}//
like this old post: https://wp-dreams.com/forums/topic/problem-on-indexing-post/
Now it show all the [fusion_builder] code.
How can I fix it?Regards
DezioJanuary 18, 2019 at 11:07 am #20841Hi Dezio,
Thank you for all the details, I think I have found the issue. The description field was missing for some reason, I have re-entered it to this field here. Now it should be all right.
I will investigate this further on the test environments to make sure it does not happen again in upcoming releases. Sorry about the inconvenience.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
January 18, 2019 at 6:34 pm #20850Ok great, thank you.
It lost during update, but I don’t know why.Thanks!
January 21, 2019 at 3:10 pm #20864You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.