WordPress.org

Forums

How to change post thumbnail title and alt attributes to post title? (3 posts)

  1. Sugar Apple
    Member
    Posted 2 years ago #

    i need to change the post thumbnail title and alt attributes to post title on homepage area, so i think it's outside the post loop.

    here it's my code.

    http://pastebin.com/RgBfpgY4

    when i`m using the_title() or the_title_attribute() the text is displayed above the images instead on images hover.

    thanks for any help.

  2. esmi
    Forum Moderator
    Posted 2 years ago #

  3. Sugar Apple
    Member
    Posted 2 years ago #

    1. get_the_title does not return anything
    2. the_title_attribute results the text displayed above the images instead displayed on image hover.

    i`m using this on homepage not inside post.

Topic Closed

This topic has been closed to new replies.

About this Topic