This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Tagged: 

Caption on featured Images

  • Creator
    Topic
  • #8422
    Michael Schütt
    Participant

    Hi,
    I`m trying to get the caption on the featured images, but can`t get it to work. Maybe you have a solution for me?

    Thanks for a great framework!
    Michael

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #8425
    Jason Bobich
    Keymaster

    Hello Michael,

    There’s no feature for this, unfortunately. You’d need to just add in your caption in your markup below the featured image within the loop of whatever display of posts you’re working with.

    You can find this area of the theme by editing the corresponding template part for whatever loop of posts you’re modifying. For example, if it’s any kind of post list, by default this will always be content-list.php — You’d just copy this file to your Child theme to edit it.

    http://dev.themeblvd.com/tutorial/editable-content-files/

    If you’re dynamically putting together a caption from some data saved to the attachment, this is a helpful function to get the attachment ID of the featured image within the loop:

    http://codex.wordpress.org/Function_Reference/get_post_thumbnail_id

    Possibly something along these lines:

    <?php echo get_post_field('post_excerpt', get_post_thumbnail_id() ); ?>

    http://codex.wordpress.org/Function_Reference/get_post_field

    #8449
    Michael Schütt
    Participant

    Hello Jason,
    thanks for your reply. That`s very helpful – I`ll work on that.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.