how to show featured image caption in list_widget

Home Forums Calendar Products Events Calendar PRO how to show featured image caption in list_widget

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #80918
    ironandsteel
    Participant

    I have made a custom list_widget.php and in it I am displaying the event’s featured image like so:
    echo(tribe_event_featured_image());
    I also want to display the image’s caption beneath it. I’ve searched and not found a function that retrieves the caption. How can I get either the image’s caption, or description, as entered in the media library?

    #80996
    Barry
    Member

    Hi ironandsteel,

    You can simply use the existing WordPress API for this, you don’t need to work through our own functions if you need something beyond what they provide. Please see:

    * get_post_thumbnail_id()
    * get_the_post_thumbnail()
    * wp_get_attachment_metadata()

    Hope that helps!

    #91144
    Barry
    Member

    It’s been a while so I’ll go ahead and close this thread. Of course if you need further help for this or any other issue please do feel free to create a new thread or threads as needed. Thanks!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘how to show featured image caption in list_widget’ is closed to new replies.