• I have a thumbnail code that displays the last five posts I have made. There is no text on these just images so it’s easy to display but I seem to be having trouble doing a few things with it.

    Here is the code:

    <?php
    $how_many=5; //How many posts do you want to show
    require_once(“/home/directory/wp-config.php”); // Change this for your path to wp-config.php file ?>

    <?php rewind_posts(); ?>
    <?php query_posts(‘showposts=5&cat=2’); ?>
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <div id=”sidethumbs”>
    <?php the_content(‘ <more>’); ?>
    </div>
    <?php endwhile; ?>
    <?php else : ?>
    <div class=”editor”>
    <?php _e(“No blog entries could be located. If this error continues then please let me know!”); ?>
    </div>
    <?php endif; ?>

    Now I have a few questions, I don’t have a single category I want to display, there’s about 200 of them.. is there a way to do an include all except a few categories

    Also, is it possible to make these thumbs show horizontally instead of vertical like it is now?

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Thumbnail preview code’ is closed to new replies.