• I am using the ‘wp jquey timlnr’ plugin and am getting stuck on how to integrate image captions. I would like to pull them directly from the caption field of each image so I can style them differently than the contents text. I have tried to edit this plugin file: “wp-jquery-timelinr/includes/template.php” to look something like below. But it doesnt work. Has anybody got any ideas on how to do this?

    <ul id="issues">
    	<?php
    	if ($query->have_posts()):
    		while ($query->have_posts()) : $query->the_post();
    
    			$timelineDate = get_post_meta($post->ID, 'timelineDate', 'true');
    			$image_caption = $post->post_excerpt;
    
    		 	echo '<li id="date'.$post->ID.'">';
    		 	echo get_the_post_thumbnail($post->ID, array(256,256) );
    			echo '<h1>'.$post->post_title.'</h1>';
    		 	echo '<p>'.$post->post_content.'</p>';
    
    			echo '<div class="timelnr-caption">' . $image_caption. '</div>'; 
    
    			echo '</li>';
    		endwhile;
    	?>
       	</ul>
  • The topic ‘Add image captions in timlnr plugin’ is closed to new replies.