• boitdecoke

    (@boitdecoke)


    Thanks to everyone (especially andrea and ron) for the may great tricks and tips in the forums for the SWT plugin.

    I’m having trouble getting the thumbnails from my sample blog to populate the tags blog. As you can see, the posts come through, but the tag defaults to the “missing image” thumbnails. I think I’ve hit a PHP wall.

    I had some luck inserting this code:

    <?php the_post_thumbnail('thumbnail_html'); ?>

    Into the loop of my index page:

    <?php
    			if ( has_post_thumbnail() ) { ?>
                        	<?php
                        	$imgsrcparam = array(
    						'alt'	=> trim(strip_tags( $post->post_excerpt )),
    						'title'	=> trim(strip_tags( $post->post_title )),
    						);
                        	$thumbID = get_the_post_thumbnail( $post->ID, 'background', $imgsrcparam ); ?>
                            <div class="preview"><a href="<?php the_permalink() ?>"><?php echo "$thumbID"; ?></a></div>
    
                        <?php } else {?>

    Trouble is, it passes through a thumbnail that is 150X150 pixels, where the sublogs will have a mix of portrait and landscape thumbs. On the posts of tags blog, I have 3 customs fields; blogid and permalink, which passes through the necessary info feeding the tags blog, and “thumbnail_html” which contains an HTML value for a different thumbnail. So I can include these 150X150 thumbs with the code snip above, but how do I tell SWT to pass through these other thumbnail values instead? I’ve tried about 20 different ways, including the custom meta field in the SWT Sitewide Admin options containing different values, and I’ve searched the forums, but I can’t find the answer.

    This might be easy as pie, and I’m just not seeing it (php noob). thanks for any help!

Viewing 3 replies - 1 through 3 (of 3 total)
  • SWT uses the thumbnail size in the media settings in the subsite. Thumbnails are generated when the image is uploaded. All SWT does is pull the WP default thumbnail html on the subsite and save that in the post meta row.

    Thread Starter boitdecoke

    (@boitdecoke)

    Hi Ron, Thanks for your response. That makes sense. It looks like my theme uses the small 150X150 thumbs inside the post pages, but not on the index page.

    The index page uses the second image option under Media Settings:

    Medium size Max Width 300 Max Height 300

    Can you use the custom meta field in SWT to bring through that medium sized image instead of the smaller default thumb? Or maybe the “featured image”? I think they may be the same. I read that earlier versions of SWT used the custom meta field to bring through thumbs, but I’m not entirely sure how to go about it. Cheers!

    Can you use the custom meta field in SWT to bring through that medium sized image instead of the smaller default thumb?

    You can edit the plugin if you like and change the size that it pulls through.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: WordPress MU Sitewide Tags Pages] Passing Custom Thumbnails through SWT?’ is closed to new replies.