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
Dezio