• Hi there, I’d like to change the size of the featured image on the home page (make it smaller, as I feel it’s too big for my purposes). I also would like to include image caption underneath the featured image (centred) to give credits to the creators of the image. I went into index php and tried to change 300,300 here:

    <?php
    if( wp_is_mobile() ) { $postimg = ‘full’; } else { $postimg = ‘medium’; }
    echo dez_get_featured_post_image(“<div class=’post-thumb in-archive’>”.$thepostlink, “</div>”, 300, 300, “alignleft img-is-“. $postimg, $postimg, dez_get_singular_cat(‘false’), the_title_attribute(‘echo=0’), false);
    ?>

    that didn’t make any difference.

    I included line

    <?php echo get_post(get_post_thumbnail_id())->post_content; ?>

    This added the caption line, but in the wrong place – I don’t know how to move it under the image and centre it there.

    Any suggestions would be much appreciated.

    Many thanks!

Viewing 1 replies (of 1 total)
  • Theme Author Richie KS

    (@rkcorp)

    try replace the original code with this

    <?php
    $caption_text = get_post(get_post_thumbnail_id())->post_content;
    if( wp_is_mobile() ) { $postimg = 'full'; } else { $postimg = 'thumbnail'; } echo dez_get_featured_post_image("<div class='post-thumb in-archive'>".$thepostlink, "</a>".$caption_text."</div>", 150, 150, "alignleft img-is-". $postimg, $postimg, dez_get_singular_cat('false'), the_title_attribute('echo=0'), false);
    ?>

    and add this to theme option->custom css

    #custom .has_thumb .post-right {margin: 0 0 0 160px;}
    #custom .has_thumb .post-thumb {text-align:center;}

Viewing 1 replies (of 1 total)
  • The topic ‘Featured Image size and caption’ is closed to new replies.