[Plugin: WordPress MU Sitewide Tags Pages] Passing Custom Thumbnails through SWT?
-
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!
- The topic ‘[Plugin: WordPress MU Sitewide Tags Pages] Passing Custom Thumbnails through SWT?’ is closed to new replies.