jeeremie
Member
Posted 2 years ago #
Hi, I want to use the_author_meta('description') in sidebar for to display information about the post author:
<?php the_author_meta('description'); ?>
I want to limit description to 50 characters only and place a link to the author's page if user want to read more about it.
Google didn't return anything about that. Does anyone know how to do that?
Something like:
$author_desc = get_the_author_meta('description');
echo 'Description ' . substr($author_desc,0,50);
$author_url = get_the_author_meta('user_url');
echo 'URL ' . $author_url);
jeeremie
Member
Posted 2 years ago #
Thanks. I will try that and let you know.
jeeremie
Member
Posted 2 years ago #
Ok, I had time to check your code. That works for description but not for url
your code get_the_author_meta('user_url'); returns the author website but I want to get the author page on the site. It should be something like http://domain.com/?author=1
So far my code is :
View <?php the_author_posts_link(); ?>'s Profile »
... which returns the post author name with a link to his profile/author page (e.g. http://domain.com/?author=1)
How should I proceed to retrieve only the url and remove the post author name? (I'd like to write "View Full Profile" and make it a link to the author page).
Thanks for your time.