Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1427878

    Hello,

    I was wondering whether it’s possible to also show the featured image on an author’s page as on the image below
    Screenshot-2023-12-12-at-15-36-59

    Best regards

    #1427932

    Hi nebuddlho,

    Yes, it’s possible but you would need to use a child theme.
    If you aren’t using a child theme yet, you can get it here: https://kriesi.at/documentation/enfold/child-theme/

    Once you have installed the child theme, create includes folder inside it, then copy loop-author.php from Enfold (parent theme) and paste it inside includes.
    Then find this code in line 72:

    $content_output  =  '<div class="entry-content" ' . avia_markup_helper( array( 'context' => 'entry_content', 'echo' => false ) ) . '>';

    above it, add this code:

    if ( has_post_thumbnail($the_id) ) {
    	echo '<div class="author-featured-image">';
    	echo get_the_post_thumbnail( $the_id, 'large' ); 
    	echo '</div>';
    }

    Hope it helps.

    Best regards,
    Nikko

    • This reply was modified 9 months ago by Nikko.
    #1428154

    Hello, I have added the code but nothing seems to be happening as far as I can see

    This is how the code looks like in enfold-child/includes/loop-author.php
    Screenshot-2023-12-14-at-19-37-19

    #1428155

    Nevermind, there was a syntax error. Thanks, you can close the topic

    #1428171

    Hi nebuddlho,

    I’m glad you fixed it :)
    Thanks for using Enfold and have a great day!

    Best regards,
    Nikko

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Add post featured image on author page’ is closed to new replies.