WordPress.org

Support

Support » How-To and Troubleshooting » get the post thumbnail

get the post thumbnail

  • Hi Guys,

    How can I make create other post feature image by using slug?

    Currently I am using this script
    get_the_post_thumbnail(57, ‘thumbnail’)

    57 is post ID

    But I wanna it to be something like this
    get_the_post_thumbnail(‘my slug’, ‘thumbnail’)

    I don’t wan to use ID to call the post, I wan to call by using slug name, is it possible?

Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘get the post thumbnail’ is closed to new replies.
Skip to toolbar