antirem
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Custom Field Image ListingAnswer to my last question at
https://www.ads-software.com/support/topic/390762?replies=3Forum: Fixing WordPress
In reply to: Post listing within a postWith 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; ?>
Forum: Fixing WordPress
In reply to: Custom Field Image Listing(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!
Forum: Fixing WordPress
In reply to: Custom Field Image ListingThank 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,