Image Caption in Excerpt

  • OPShots

    #8640

    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?

    OPShots

    #41696

    Hi, just checking in on this. I have combed the support here and across the web and cannot find this answer. Is this possible?

    Anonymous

    #41697

    Where exactly in excerpt? Can you provide some link or image? I’m not understanding this through…

    Mod

    Kenneth John Odle

    #41698
    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.

    OPShots

    #41699

    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:

    front_page_excerpt_zps88e1dece.jpg

    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.

    Anonymous

    #41700

    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…

    OPShots

    #41701

    Thank you Luko but that does not appear to be showing the image caption.

    Anonymous

    #41702

    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.

    OPShots

    #41703

    Sorry it took me a while to get back to you. This did not work for me either.

    Anonymous

    #41704

    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.