Using thumbnails for popular post plugin without custom fields(2.9)
-
2.9 introduced a post thumbnail option which, when implemented with the following plugins, can eliminate the need to use custom fields. Here is my method, open to suggestions!
1. Go to Kremalicious and follow his instructions on how to activate the plugin.
2. Create a new template output tag / function (called mine postthumb) in the output_tags.php file, from the Post Plugin Library, which is required for the Popular posts plugin I’m using.
3. My custom output tag / function looks like this
function otf_postthumb ($option_key, $result, $ext) { return get_the_post_thumbnail($result->ID, 'thumbnail' ); }
4. Under Popular Posts settings->output, add your new custom tag. Mine looks like this
<li><a href="{url}">{postthumb} {title}</a></li>
I’m still having issues with 2.9’s cropping accuracy for my thumbs (they are 1 pixel off) but this is a great way to avoid custom fields for displaying thumbs for popular posts
- The topic ‘Using thumbnails for popular post plugin without custom fields(2.9)’ is closed to new replies.