GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   WP plugin to have recent posts with thumbs in sidebar? (https://gfy.com/showthread.php?t=994094)

DWB 10-24-2010 02:10 AM

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.

Jdoughs 10-24-2010 02:22 AM

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) ); ?>
This calls the title:
Code:

<a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a>
This calls the exerpt:
Code:

<?php the_excerpt(); ?>
It does have to be in the loop, you may need to do a fresh wp query for the posts.

This should work, complete without any css to it:
Code:

<?php $recent = new WP_Query('showposts=6'); while($recent->have_posts()) : $recent->the_post();?>
<?php the_post_thumbnail( array(265,265) ); ?>
<a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a>
<?php the_excerpt(); ?>
<?php endwhile; ?>


Highest Def 10-24-2010 02:37 AM

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.

jonnydoe 10-24-2010 02:37 AM

Nice Jdoughs :thumbsup

DWB 10-24-2010 04:38 AM

Quote:

Originally Posted by Jdoughs (Post 17636145)
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) ); ?>
This calls the title:
Code:

<a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a>
This calls the exerpt:
Code:

<?php the_excerpt(); ?>
It does have to be in the loop, you may need to do a fresh wp query for the posts.

This should work, complete without any css to it:
Code:

<?php $recent = new WP_Query('showposts=6'); while($recent->have_posts()) : $recent->the_post();?>
<?php the_post_thumbnail( array(265,265) ); ?>
<a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a>
<?php the_excerpt(); ?>
<?php endwhile; ?>


Well look at you. :thumbsup

I'll dig in and see if I can get that to work. Thanks man.

DWB 10-24-2010 04:44 AM

Quote:

Originally Posted by Highest Def (Post 17636154)
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.

I'll use that if I fail the other way.

fris 10-24-2010 04:48 AM

use what jdoughs said, its your best option, but make sure each post has a thumbnail

DWB 10-24-2010 05:05 AM

Quote:

Originally Posted by Jdoughs (Post 17636145)

This should work, complete without any css to it:
Code:

<?php $recent = new WP_Query('showposts=6'); while($recent->have_posts()) : $recent->the_post();?>
<?php the_post_thumbnail( array(265,265) ); ?>
<a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a>
<?php the_excerpt(); ?>
<?php endwhile; ?>


I get an error when I include the thumbnail line, but I remove it and they show up with text and permalink as it should.

Any idea what in that line would give me fatal error?

Jdoughs 10-24-2010 05:14 AM

Quote:

Originally Posted by DirtyWhiteBoy (Post 17636244)
I get an error when I include the thumbnail line, but I remove it and they show up with text and permalink as it should.

Any idea what in that line would give me fatal error?

It's probably the width/height settings or there is no matching thumbnails on the posts, but here's a great explanation off wp wiki. Try the default one and see if they show up.

Code:

the_post_thumbnail();                  // without parameter -> Thumbnail

the_post_thumbnail('thumbnail');      // Thumbnail
the_post_thumbnail('medium');          // Medium resolution
the_post_thumbnail('large');          // Large resolution

the_post_thumbnail( array(100,100) );  // Other resolutions


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.

DWB 10-24-2010 05:20 AM

Fatal error: Call to undefined function the_post_thumbnail()

DWB 10-24-2010 05:21 AM

Quote:

Originally Posted by Jdoughs (Post 17636260)
It's probably the width/height settings or there is no matching thumbnails on the posts, but here's a great explanation off wp wiki. Try the default one and see if they show up.

Code:

the_post_thumbnail();                  // without parameter -> Thumbnail

the_post_thumbnail('thumbnail');      // Thumbnail
the_post_thumbnail('medium');          // Medium resolution
the_post_thumbnail('large');          // Large resolution

the_post_thumbnail( array(100,100) );  // Other resolutions


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.

I'm on it. Thanks. Appreciate it.

fris 10-24-2010 06:59 AM

you need to make your theme thumbnail ready

add this to your themes functions.php file

Code:

add_theme_support( 'post-thumbnails' );

DWB 10-24-2010 07:08 AM

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(); ?>

        <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

                <?php get_the_image( array( 'meta_key' => 'feature_img', 'size' => 'medium', 'width' => '257', 'height' => '164', 'image_class' =>

'feature' ) ); ?>

                <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark"><?php the_title(); ?></a>

                <div class="entry-summary">
                        <?the_excerpt(); ?>
                </div>

        </div>

<?php endwhile; endif; ?>


fris 10-24-2010 08:09 AM

hit me up 704-299 ill see what the scoop is

chronig 10-24-2010 10:12 AM

Quote:

Originally Posted by Highest Def (Post 17636154)
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.

wow! I had an indian version of this plugin and it was fucking up a little bit

This one is nearly identical (same framework) but much more intuitive and is working better on my site :pimp:pimp :thumbsup:thumbsup thx

fris 10-24-2010 11:55 AM

Quote:

Originally Posted by chronig (Post 17636667)
wow! I had an indian version of this plugin and it was fucking up a little bit

This one is nearly identical (same framework) but much more intuitive and is working better on my site :pimp:pimp :thumbsup:thumbsup thx

or you could use yarpp, it has a template system.

Brujah 10-24-2010 12:11 PM

Quote:

Originally Posted by DirtyWhiteBoy (Post 17636262)
Fatal error: Call to undefined function the_post_thumbnail()

In case your WP install is an older version,
Added since 2.9.0
http://codex.wordpress.org/Function_...post_thumbnail

DWB 10-25-2010 05:44 PM

Thanks again everyone. It's working.

V_RocKs 10-25-2010 07:09 PM

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