• Hi there, is a chance to query for an author description. I only want to display a div with the_author_description only if one exists. How can i do that?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    $description = get_the_author_description();
    if (!empty($description)) {
    echo '<div>';
    the_author_description();
    echo '</div>';
    }
    Thread Starter sepp88

    (@sepp88)

    thank you! works perfectly!

    I want to do something similar but with the custom tags, for instance with titles, If I have a custom tag called “meta-title” I’m currently inserting it into the header using the following code;

    <?php $key="meta-title"; echo get_post_meta($post->ID, $key, true); ?>

    could the same code be applied and how?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘If the_author_descrption exists’ is closed to new replies.