• Hello,

    I have tried to display at the bottom of my post random articles and thumbnails (this are from custom fields) but with no success.

    I have used this code:

    <?php $my_query = new WP_Query('orderby=rand&showposts=4');
    while ($my_query->have_posts()) : $my_query->the_post();
    ?>
    
    <li><a href="<?php the_permalink() ?>"><img style="border: none;" alt="random article" src="<?php bloginfo('stylesheet_directory'); ?>/timthumb.php?src=<?php echo get_post_meta($post->ID, "thumb", true); ?>&amp;h=47&amp;w=140&amp;zc=1;" /></a>

    The good news it that it generates random articles with thumbnails in my post, but the bad news it that it random the comments from my blog also.

    Any help will be much appreciated !

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter wp_girl

    (@wp_girl)

    Nobody :(((( ?

    Thread Starter wp_girl

    (@wp_girl)

    any help 🙁 ?

    not sure what you mean exactly…sorry.

    your setup =
    post 1 content
    post 1 comments

    followed by…
    random articles with thumbs ( no comments on these guys )

    what’s happening?…
    your post 1 comments are random? meaning what – all post 1 comments but out of order? or random comments appearing from other posts?

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Display Random Articles With Thumbnails in Posts’ is closed to new replies.