I am trying to figure out how to add a custom field to display an image instead of a title on the stats_get_csv from Wordpress stats.
<?php if ( function_exists('stats_get_csv') && $top_posts = stats_get_csv('postviews', 'days=2&limit=6') ) : ?>
<ol>
<?php foreach ( $top_posts as $p ) : ?>
<li><a href="<?php echo $p['post_permalink']; ?>"><?php echo $p['post_title']; ?></a></li>
<?php endforeach; ?>
</ol>
<?php endif; ?>
Update
<?php if ( function_exists('stats_get_csv') && $top_posts = stats_get_csv('postviews', 'days=2&limit=6') ) : ?>
<?php if ( get_post_meta($post->ID, 'Image', true) ) : ?>
<ol>
<?php foreach ( $top_posts as $p ) : ?>
<li>
<img class="thumb" src="<?php echo get_post_meta($post->ID, 'Image', true) ?>" alt="<?php the_title(); ?>" height='100' width='100' />
</li>
<?php endforeach; ?>
</ol>
<?php endif; ?>
<?php endif; ?>
stats_get_csvlook like? – BandonRandon Apr 7 '11 at 5:53