Title: Get title in thumbnail array
Last modified: August 20, 2016

---

# Get title in thumbnail array

 *  Resolved [baszer](https://wordpress.org/support/users/baszer/)
 * (@baszer)
 * [13 years, 12 months ago](https://wordpress.org/support/topic/get-title-in-thumbnail-array/)
 * hello,
 * is it possible to get the title of the post in the array?
 *     ```
       <img data-slider='<?php the_ID(); ?>'/> <?php the_post_thumbnail(
       	array(200, 200),
       	array(
       		'class' => 'thumbnail-slider',
       		'alt' => 'post thumbnail',
       		'title' => $title,
       		'data-slider' => $id
       	)
       ); ?>
       ```
   
 * i get the ID, but not the title (I also tried $post-title)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [13 years, 12 months ago](https://wordpress.org/support/topic/get-title-in-thumbnail-array/#post-2826786)
 * Try $post->post_title.
 *  Thread Starter [baszer](https://wordpress.org/support/users/baszer/)
 * (@baszer)
 * [13 years, 12 months ago](https://wordpress.org/support/topic/get-title-in-thumbnail-array/#post-2826789)
 * thanks esmi, did the trick!
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [13 years, 12 months ago](https://wordpress.org/support/topic/get-title-in-thumbnail-array/#post-2826796)
 * Excellent 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Get title in thumbnail array’ is closed to new replies.

 * 3 replies
 * 2 participants
 * Last reply from: [esmi](https://wordpress.org/support/users/esmi/)
 * Last activity: [13 years, 12 months ago](https://wordpress.org/support/topic/get-title-in-thumbnail-array/#post-2826796)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
