Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter antirem

    (@antirem)

    Thread Starter antirem

    (@antirem)

    With enough tweaking I got it to work. I haven’t a clue what most of it means.. but eventually it turned out the way I wanted.

    Thanks!

    <?php if (query_posts('posts_per_page=20')) : ?>
      <?php while (have_posts()) : the_post(); ?>
        <?php if(get_post_meta($post->ID, "small-image", true)) : ?>
          <a href="<?php the_permalink(); ?>" class="thumbnail"><img src="<?php echo get_post_meta($post->ID, "small-image", true); ?>" /></a>
        <?php endif; ?>
      <?php endwhile; ?>
      <?php wp_reset_query(); ?>
    <?php endif; ?>
    Thread Starter antirem

    (@antirem)

    (bit belated, sorry)

    What code can I use for global posts? So that it will show ALL posts regardless of what page your on?

    Thanks!

    Thread Starter antirem

    (@antirem)

    Thank you very much, the restet code worked beautifully!

    I have a new problem now.

    The thumbnail listing should go on the right hand side of every page. It lists all the thumbnails of every post correctly on the homepage, but if I goto a posts page it only show the thumbnail for that post.

    My code is as follows.

    <?php if (have_posts()) : ?>
      <?php while (have_posts()) : the_post(); ?>
        <?php if(get_post_meta($post->ID, "small-image", true)) : ?>
          <a href="<?php the_permalink(); ?>" class="thumbnail"><img src="<?php echo get_post_meta($post->ID, "small-image", true); ?>" /></a>
        <?php endif; ?>
      <?php endwhile; ?>
    <?php endif; ?>

    I assume that have_posts is looking on the current page, and not going to the root of the site to look for posts.

    Thanks again,

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