![]() |
WP plugin to have recent posts with thumbs in sidebar?
Anyone know of a plugin that will show recent posts in the sidebar WITH thumbs (along with a little text)?
Thanks. |
You can do it easily with no plugins, there probably is lots of them, but it's all built into wp now, this calls the post thumbnail:
Code:
<?php the_post_thumbnail( array(265,265) ); ?> Code:
<a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a> Code:
<?php the_excerpt(); ?> This should work, complete without any css to it: Code:
<?php $recent = new WP_Query('showposts=6'); while($recent->have_posts()) : $recent->the_post();?> |
If that's too advanced for you, try http://wordpress.shaldybina.com/plug...ts-thumbnails/
It will automatically dump them after the post, but you can turn that off and slap the php tag anywhere. Not the easiest to style but it's still possible. Feel free to contact me if you need a little help figuring it out. |
Nice Jdoughs :thumbsup
|
Quote:
I'll dig in and see if I can get that to work. Thanks man. |
Quote:
|
use what jdoughs said, its your best option, but make sure each post has a thumbnail
|
Quote:
Any idea what in that line would give me fatal error? |
Quote:
Code:
the_post_thumbnail(); // without parameter -> Thumbnail EDIT, yeah I'm sorry, they will work like above, but the example I showed with the array and sizes only works if your theme is thumbnail ready I think. |
Fatal error: Call to undefined function the_post_thumbnail()
|
Quote:
|
you need to make your theme thumbnail ready
add this to your themes functions.php file Code:
add_theme_support( 'post-thumbnails' ); |
I tried that every which way but loose and could not get the thumb to work right. So.... this is what works with the help of a plugin called Get The Image. Close to what you posted but for some reason I just could not get it the thumbs to load.
Code:
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> |
hit me up 704-299 ill see what the scoop is
|
Quote:
This one is nearly identical (same framework) but much more intuitive and is working better on my site :pimp:pimp :thumbsup:thumbsup thx |
Quote:
|
Quote:
Added since 2.9.0 http://codex.wordpress.org/Function_...post_thumbnail |
Thanks again everyone. It's working.
|
And the working change was?
|
All times are GMT -7. The time now is 08:23 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123