• 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?

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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);
    Thread Starter jeeremie

    (@jeeremie)

    Thanks. I will try that and let you know.

    Thread Starter jeeremie

    (@jeeremie)

    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 &raquo;

    … 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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘author’s description in sidebar limited to 50 character. how to ?’ is closed to new replies.