• Resolved ivanmessina

    (@ivanmessina)


    Hello Dennis,

    I have been using your plugin for a while…

    Did you find a solution for the author BIO? The author is the same for english and italian, but I’d love the bio is only one for the author, thus I can’t translate it. Any ideas before I star looking for a wp filter and filter it manually in the other languages?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Dennis Ploetner

    (@realloc)

    Hey Ivan,

    I guess I can reactivate this one here quickly: https://github.com/lloc/Whoami

    This would add a description field in any blog. Is it what you were looking for?

    Cheers!

    Thread Starter ivanmessina

    (@ivanmessina)

    Thanks. I was hoping for a built-in solution.

    I already have an ACF field for every author bio (one for every language, so I made a filter and show the correct one depending on the language of the blog:

    add_filter( 'get_the_author_user_description', 'filter_the_content_in_the_main_loop', 1 );

    function filter_the_content_in_the_main_loop( ) {

    $blog = msls_blog_collection()->get_current_blog();
    $alpha2 = $blog->get_alpha2();

    $field = ( $alpha2 == 'en' ) ? 'short_bio' : 'short_bio_italian';

    $author_id = get_the_author_meta('ID');
    $author_field = wp_strip_all_tags( get_field($field, 'user_'. $author_id ) );

    return $author_field;
    }

    posting this in case someone gets to this post in the future

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.