Web Hosting
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix 4.83 > 4.9 – get_the_author_meta description

Discussion in 'Misc WordPress Requests' started by theApe, Nov 16, 2017.

  1. theApe

    Guest

    4.83 > 4.9 – get_the_author_meta description, by theApe

    This is just for reference…

    $author_desc = get_the_author_meta('description', $user->ID);
    echo '' . substr($author_desc,0,45);

    Output

    4.8.3: Aenean lacinia bibendum nulla sed consectetur...
    4.9: <p>Aenean lacinia bibendum nulla sed consecte...

    Solution

    $author_desc = get_the_author_meta('description', $user->ID);
    $author_desc = strip_tags($author_desc);
    echo '' . substr($author_desc,0,45);

    Output

    4.8.3: Aenean lacinia bibendum nulla sed consectetur...
    4.9: Aenean lacinia bibendum nulla sed consectetur...

    4.83 > 4.9 – get_the_author_meta description
     
    #1

Share This Page

Web Hosting