[Stockholm] Add caption to featured image/thumbnail
-
There are many nice images to be used as featured images/thumbnails, which are licenced under Creative Commons (CC). In order to properly and legally safely use them, the licence must be named and linked in the caption.
The Stockholm theme originally does not feature captions for featured images.
Another theme I know well (Urwahl 3000) uses this code in the content-single.php file to display the caption:<?php if ( has_post_thumbnail() ): ?> [...] <?php $imgexc = get_post(get_post_thumbnail_id())->post_excerpt; if ($imgexc != "") { ?><p class="caption"><span>[...] <?php echo $imgexc;?></span></p><?php } ?> <?php endif; ?>
I checked all files of the Stockholm theme for any thumbnail-reference. Only
functions.php
defines thumbnail support.
My question is simply: In which file can I inject the code in order to display featured image captions?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘[Stockholm] Add caption to featured image/thumbnail’ is closed to new replies.