[Resolved] Update 1.9.1 to 1.10.0 is kicking my featured images

Home Forums Support Update 1.9.1 to 1.10.0 is kicking my featured images

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1325581
    Bernd

    Hi there,

    i have (only on one website) a small problem updating to the latest version of GP.

    After the update my featured images have disappeared.

    Only modifications i think:

    I use a small snippet to show credits

    add_action( 'post_thumbnail_html', 'tu_custom_byline', 10 );
    function tu_custom_byline() {
    global $post;
    $rightsby = get_post_meta( $post->ID, 'copyright_photo', true );
    	echo '<div class="wp-caption thumb-caption">'.$rightsby .'</div>';
    }

    Many thanks for your efforts!

    P.S. GP and GB are simply fantastic. Stay tuned! 🙂

    #1325726
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    That code never should have been showing featured images, as the actual HTML featured image variable isn’t there.

    Try this:

    add_action( 'post_thumbnail_html', 'tu_custom_byline', 10 );
    function tu_custom_byline( $html ) {
        global $post;
        $rightsby = get_post_meta( $post->ID, 'copyright_photo', true );
        return $html . '<div class="wp-caption thumb-caption">'.$rightsby .'</div>';
    }
    #1325761
    Bernd

    Hello, Tom,

    thanks for your answer. It solved my problem.

    very funny that the code has worked so far 🙂

    #1326527
    Tom
    Lead Developer
    Lead Developer
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.