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?
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?
$description = get_the_author_description();
if (!empty($description)) {
echo '<div>';
the_author_description();
echo '</div>';
}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?
You must log in to post.