WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. SNSD Photo
    Member
    Posted 1 year 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
    Theme Diva & Forum Moderator
    Posted 1 year ago #

  3. SNSD Photo
    Member
    Posted 1 year 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