Add post title into title of Thumbnail

  • Unknown's avatar

    Hi, I’m use the_post_thumbnail to display a small thumbnail on the index page and a larger one on the post page. Which all works fine. However I can’t seem to set the title of the thumbnails to that of the title of the post.

    Can set a normal title no problem using: the_post_thumbnail('thumbnail', array( 'class' => 'alignleft', 'title'=> 'Normal Title' ));

    However i want to be able to put the title of the post in and not sure how to do it. I have tried using the_title(); but because its within the ‘ ‘ of the_post_thumbnail function I’m not sure how to do it.

    Can anyone help?

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    The blog you specified at http://www.stcolumbasportadown.co.uk does not appear to be hosted at WordPress.com.

    This support forum is for blogs hosted at WordPress.com. If your question is about a self-hosted WordPress blog then you’ll find help at the WordPress.org forums.

    If you don’t understand the difference between WordPress.com and WordPress.org, you may find this information helpful.

    If you forgot to include a link to your blog, you can reply and include it below. It’ll help people to answer your question.

    This is an automated message.

  • Unknown's avatar

    As the Support Bot says, you’d need to head to http://wordpress.org/support/ for help with your blog I’m afraid.

  • The topic ‘Add post title into title of Thumbnail’ is closed to new replies.