 
	
		Tagged: caption, featured image, single post
- 
		AuthorPosts
- 
		
			
				
October 30, 2013 at 9:31 am #182358Is there a way to add captions below the featured image on a single post page? October 31, 2013 at 3:10 am #182774Hi jenerdman! What kind of Blog Style do you have for your single post page? Regards, 
 IsmaelOctober 31, 2013 at 4:36 am #182805Single post style with big preview image. You can see a sample page here: http://yourmiweddingvenue.com/stand-out-in-the-wedding-industry/ - 
		This reply was modified 12 years ago by jenerdman. 
 November 2, 2013 at 10:29 am #183670Hey! Open up enfold/includes/loop-page.php and replace <?php if($slider->slidecount) echo $slider->display(); ?>with <?php 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. Cheers! 
 PeterNovember 4, 2013 at 10:31 am #184157that text doesn’t exist in my loop-page.php file? November 6, 2013 at 4:03 am #185041Hey! 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, 
 DevinNovember 6, 2013 at 9:09 am #185089OK, I updated the theme but I still don’t see that line in the loop-page.php file?? November 7, 2013 at 3:51 am #185461Hi! 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, 
 IsmaelNovember 7, 2013 at 6:54 pm #185747excellent. 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? November 9, 2013 at 5:42 pm #186494Yep, that looks correct. 
- 
		This reply was modified 12 years ago by 
- 
		AuthorPosts
- The topic ‘Featured Image Captions?’ is closed to new replies.
