Hi
I’m creating a featured post slider for WordPress. In order to get an HTML caption to display, I need to set the title of the featured image to the post’s ID (title=”#post-id”). I’m thinkin something on the lines of…
< ?php the_post_thumbnail('article-banner',array( 'class' => “”, ‘title’ => ” #.get_the_ID(); “)); ? >
…but I’m not sure if that’ll work and it seems a little contrived. The output that I’m ultimately looking for needs to be:
< img src="media/featured-image.jpg" alt="" title="#post-id" / >
Any help would be appreciated. Thanks in advance.