Commit 34a51481 authored by Everaldo Matias's avatar Everaldo Matias
Browse files

Add div on terms of the block Custom Taxonomy

parent 60dce725
......@@ -65,6 +65,9 @@ function render_block_core_post_terms_2($attributes, $content, $block)
$wrapper_attributes = get_block_wrapper_attributes(array('class' => $classes));
$html_array = [];
$html .= '<div class="hacklab-custom-taxonomy-block">';
foreach ($post_terms as $term) {
// The $term is an object, so we don't need to specify the $taxonomy.
$term_link = get_term_link($term);
......@@ -85,10 +88,12 @@ function render_block_core_post_terms_2($attributes, $content, $block)
}
// We successfully got a link. Print it out.
$html_array[]= '<a clases="' . $class . '" href="' . esc_url($term_link) . '">' . $term->name . '</a>';
$html_array[]= '<a class="' . $class . '" href="' . esc_url($term_link) . '">' . $term->name . '</a>';
}
$html = implode($separator, $html_array);
$html .= implode($separator, $html_array);
$html .= '</div>';
}
return $html;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment