Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
  • #182358

    Is there a way to add captions below the featured image on a single post page?


    Hi jenerdman!

    What kind of Blog Style do you have for your single post page?



    Single post style with big preview image. You can see a sample page here: (Purchase code hidden if logged out) -industry/”> (Purchase code hidden if logged out) -industry/

    • This reply was modified 3 years, 11 months ago by  jenerdman.


    Open up enfold/includes/loop-page.php and replace

    <?php if($slider->slidecount) echo $slider->display(); ?>


    if($slider->slidecount) echo $slider->display(); 
    $description = get_post_field('post_content', get_post_thumbnail_id());
    echo $description;

    You can use the “Description” field on the image attachment editor page (Media > Library > Edit) to save a description text.



    that text doesn’t exist in my loop-page.php file?



    If you aren’t using 2.4.2 make sure to update so that you have the most recent version of the theme files and code.

    Best regards,


    OK, I updated the theme but I still don’t see that line in the loop-page.php file??



    Edit includes > loop-index.php, find this code:

    if($slider) $slider = '<a href="'.$link.'">'.$slider.'</a>';
    			if($slider) echo '<div class="big-preview '.$blog_style.'">'.$slider.'</div>';

    Below, add Dude’s code:

    $description = get_post_field('post_content', get_post_thumbnail_id());
    			echo $description;

    Edit the images on Media > Library > Edit and put the caption on the Description field of the image.

    Best regards,


    excellent. That worked. I added css styling to it:

    $description = get_post_field('post_content', get_post_thumbnail_id());
    echo '<div class="featured-caption">' .$description.'</div>';

    Is that correct?


    Yep, that looks correct.

Viewing 10 posts - 1 through 10 (of 10 total)

The topic ‘Featured Image Captions?’ is closed to new replies.