Title: su_image_carousel Title missing for posts
Last modified: November 17, 2019

---

# su_image_carousel Title missing for posts

 *  Resolved [eikebaran](https://wordpress.org/support/users/eikebaran/)
 * (@eikebaran)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/su_image_carousel-title-missing-for-posts/)
 * Hi!
 * First of all thank you for your very handy plugin. At the moment I’m working 
   on a page where i want to put a big slideshow of the most recent posts into the
   header-section. In Addition to their featured image i would like to display the
   posts title. But if i select the captions=”yes”-option for the su_image_carousel
   no Post-title is shown. I’ve tracked it down and noticed that in /includes/functions-
   galleries.php line 283:
 *     ```
        $attachment_id = 'media' === $source['type'] || 'attachment' === $post->post_type
                               ? $post->ID
                               : get_post_thumbnail_id( $post->ID );
       /*...*/
   
       $slide = array(
       'attachment_id' => $attachment_id,
       'caption'       => trim( wp_get_attachment_caption( $attachment_id ) ),
       );
       ```
   
 * The caption is set to the attachments caption even if the post has its own caption–
   which i assume most of the time is the caption the user wants to see in that 
   post-slider. I fixed it up locally as follows by removing the cited lines above
   and putting this right in the foreach-block at line 273. This was just a quick
   fix, i dunno if this breaks something elsewhere, especially if the if-clause 
   is fishes for the the correct source-types.
 *     ```
       $slide=array();
   
       if('media' === $source['type'] || 'attachment' === $post->post_type){
       	$slide['attachment_id']=$post->ID;
       	$slide['caption']=trim( wp_get_attachment_caption( $slide['attachment_id'] ));
       }else{
       	$slide['attachment_id']= get_post_thumbnail_id( $post->ID );
       	$slide['caption']=get_the_title($post->ID);
       }
       ```
   
 * Would be nice if this would be fixed in future versions.
 * Bye,

Viewing 1 replies (of 1 total)

 *  Plugin Author [Vova](https://wordpress.org/support/users/gn_themes/)
 * (@gn_themes)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/su_image_carousel-title-missing-for-posts/#post-12144866)
 * Hi [@eikebaran](https://wordpress.org/support/users/eikebaran/),
 * thanks for pointing this out. I’ll fix it in the closest update.

Viewing 1 replies (of 1 total)

The topic ‘su_image_carousel Title missing for posts’ is closed to new replies.

 * ![](https://ps.w.org/shortcodes-ultimate/assets/icon-256x256.gif?rev=2547563)
 * [Shortcodes Ultimate - Content Elements](https://wordpress.org/plugins/shortcodes-ultimate/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/shortcodes-ultimate/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/shortcodes-ultimate/)
 * [Active Topics](https://wordpress.org/support/plugin/shortcodes-ultimate/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shortcodes-ultimate/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shortcodes-ultimate/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Vova](https://wordpress.org/support/users/gn_themes/)
 * Last activity: [6 years, 6 months ago](https://wordpress.org/support/topic/su_image_carousel-title-missing-for-posts/#post-12144866)
 * Status: resolved