WordPress.org

Ready to get started?Download WordPress

Forums

NextGEN Gallery
NextGen + Tinthumb function no featured images showing (2 posts)

  1. Fabian Krenzler
    Member
    Posted 3 years ago #

    I have problems with the thumbnails not showing in combination with a theme that is using the tinthumb function.

    I am selecting a featured image for a post from the nextgen and it is not showing. If I select it from the mediasection it is showing.

    After talking to the theme developer he told me to talk to you and sended me the following:

    The code we use is correct, and uses the function that wordpress uses. Please post a question for the next gen creators. You have give them this code

    <?php if ( has_post_thumbnail() ): ?>
        <?php $thumbnail_src = wp_get_attachment_url( get_post_thumbnail_id($post->ID ) ); ?>
        <?php $website_url = get_bloginfo('wpurl'); ?>
        <?php $thumbnail_src = str_replace($website_url,'', $thumbnail_src); ?>
        <a>" title="<?php the_title();?>">
            <img src="<?php echo get_bloginfo('template_directory');?>/includes/timthumb.php?src=<?php echo $thumbnail_src; ?>&h=140&w=280&zc=1&q=100" alt="<?php the_title(); ?>" />
        </a>
    <?php endif; ?>

    [Please post code snippets between backticks or use the code button.]

    Can somebody help?

    http://wordpress.org/extend/plugins/nextgen-gallery/

  2. RoamFree
    Member
    Posted 2 years ago #

    The above TimThumb code can't handle NGG image IDs (ie, "ngg-1") because wp_get_attachment() refuses to activate its filters when the image ID is not found. So NGG can't add a filter to handle NGG images.

    The theme can be patched with code similar to what is in another comment.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.