0
divスタイルの背景(xxxxx)にタクソノミの画像URLを設定します。私は "taxonomy images"プラグインを使用しますが、wp_get_attachment_image
は機能しません。分類画像divの背景
<?php
$terms = apply_filters('taxonomy-images-get-terms', '', array(
'taxonomy' => 'categoria_proyectos',
));
if (! empty($terms)) {
print '';
foreach ((array) $terms as $term) {
print '
<a href="' . esc_url(get_term_link($term, $term->taxonomy)) . '">
<div class="style="background-image: url(xxxxxx); ">
</div>
</a>';
}
}
?>