I had insert this code to get the description:
<?php
function display_author_info() {
$terms = wp_get_post_terms(get_the_ID(), 'author');
if (isset($terms[0]->name) && isset($terms[0]->description)) {
?>
<h3 class="titre-aut">Auteur</h3>
<?php
}
if (isset($terms[0]->name)) {
?>
<h4 class="author-title"><?php echo esc_html($terms[0]->name); ?></h4>
<?php
}
if (isset($terms[0]->description)) {
?>
<p class="author-texte"><?php echo esc_html($terms[0]->description); ?></p>
<?php
}
}
?>
<?php display_author_info(); ?>
I used wp_kses_post()
instead of esc_html()
in: <p class="author-texte"><?php echo esc_html($terms[0]->description); ?></p>
It’s OK.
]]>