Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1166338

    Hi guys,

    is it possible to show the author avatar image on the post slider?

    Regards,
    Andy

    #1166867

    Hey burdeMedia,

    Yes, but there are some things you need to do first so it’s permanent.
    First you’ll need to use a child theme: https://kriesi.at/documentation/enfold/child-theme/
    Then do the instructions mentioned here: https://kriesi.at/documentation/enfold/intro-to-layout-builder/#add-elements-to-alb
    Inside the child theme, create a folder and name it shortcodes
    Copy (from the parent theme) postslider.php (located in enfold > config-templatebuilder > avia-shortcodes > postslider folder) and paste it in the shortcodes folder of the child theme.
    Modify postslider.php (in the child theme) and find this code (line 634):

    $output .= !empty($excerpt) ? "<div class='slide-entry-excerpt entry-content' $markup>".$excerpt."</div>" : "";

    below it add this code:

    $output .= "<img src=" . get_avatar_url(get_the_author_meta('user_email', $current_post['id'])) . " alt=\"author\" />";

    Hope this helps.

    Best regards,
    Nikko

    #1167215

    Hi Nikko,
    that works! Thx!

    Great support!

    #1167568

    Hi burdeMedia,

    We’re glad that we could help :)
    Thanks for using Enfold and have a great day!

    Best regards,
    Nikko

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Show Author Avatar on post slider’ is closed to new replies.