Image Caption in Excerpt
-
Where exactly in excerpt? Can you provide some link or image? I’m not understanding this through…
Mod
Quote:Hello I would like to show my image caption below my thumbnails in the excerpt. Is this possible?Probably with a child theme.
Quote:Hello I would like to show my image caption below my thumbnails in the excerpt. Is this possible?One more question how to I make the Show Post Author’s Info the name (author) it shows in that box clickable and it loads the authors page?
It already is, isn’t it? If I go here: http://www.opshots.net/2014/01/end-of-an-era-deltas-dc-9-completes-final-scheduled-flight/ and click on “Aeroplanepics0112” it takes me to http://www.opshots.net/author/aeroplanepics/
Cool favicon, btw.
Thanks guys for checking. So currently when you create a post using Graphene and you have a front page with posts from your blog it displays the front page posts in excerpt form with a thumbnail and no caption, and one can click on the post to go to the full posting/article and that is when the thumbnail shows with the full text from the article and a single post the one you just clicked on.
Image example for thumbnail with caption on front page:
What I would like is the thumbnail to show on the front page as well on the posts.
In regards to the author page if you click on the Aeroplanepics0112 under the author in the link Kenneth shared the author by the tile of the post where is says by aeroplanepics0112, however when one goes to the bottom of the full page posting where there is a little author bio that one is not clickable.
I am using a child theme as well.
For that you have to alter loop.php
You can copy that file in child-theme folder and add edit code on line 256 (cca.):
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf( esc_attr__( 'Permalink to %s', 'graphene' ), the_title_attribute( 'echo=0' ) ); ?>">
<?php the_post_thumbnail( apply_filters( 'graphene_excerpt_thumbnail_size', 'thumbnail' ) ); echo get_post(get_post_thumbnail_id())->post_excerpt;?>
</a>“echo get_post(get_post_thumbnail_id())->post_excerpt;” is added code for image excerpt.
After that you need to style it with css…
Scratch that. Activate graphene_after_post_content action hook and than insert this code in child theme functions.php:
function featured_image_caption () {
global $post;
$thumbnail_id = get_post_thumbnail_id($post->ID);
$thumbnail_image = get_posts(array('p' => $thumbnail_id, 'post_type' => 'attachment'));
if ($thumbnail_image && isset($thumbnail_image[0])) {
echo '<span>'.$thumbnail_image[0]->post_excerpt.'</span>';
}
}
add_action('graphene_after_post_content', 'featured_image_caption')You can use different action hook and you can give the span a class for styling with css later.
Does that code returns any error or it’s just simply doesn’t return thumbnail excerpt?
Test it on my testsite and it works OK.
Basic question, where did you entering your image excerpts? Under Edit Media/Caption?
Viewing 10 posts - 1 through 10 (of 12 total)
- 1
- 2
- You must be logged in to reply to this topic.