1 year ago
#376586
user16453820
How to add category description isnide hook?
how can I insert a category description inside the hook, or at least an adc field assigned to this category? echo category_description does not work. I didn't work very much with hooks, unfortunately I couldn't find additional information, so I'm turning to professionals
<?php
$terms = get_terms(array(
'hide_empty' => false,
'parent' => 0
));
foreach ($terms as $val) {
$image = get_field('obrazek', 'kategoria_' . $val->term_id);
echo '<div id="' . $val->slug . '">';
echo '<a name="' . $val->slug . '"></a>';
echo '<h2 class="cat-name ">' . $val->name . '</h2>';
$subterm = get_terms(
array(
'hide_empty' => false,
'parent' => $val->term_id
)
);
wordpress
hook
categories
advanced-custom-fields
blogs
0 Answers
Your Answer