custom field from tag pages
-
Hi guys
I use custom field to post an image thumbnail for posts with certain tags. I use the custom field name ” AppLogo “
I was wondering if there is any way I can show say random posts in the sidebar. But instead of the text links I want the Custom Field Thumbnails to be shown which links to the post url.
For categories I can get this using this
<?php $random_query = new WP_Query(array( 'post__not_in' => $do_not_duplicate, 'showposts' => 4, 'cat' => 2704 )); while ($random_query->have_posts()) : $random_query->the_post(); ?> <div style="text-align:center"><a>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php $values = get_post_custom_values("AppLogo"); echo $values[0]; ?>" alt="wp7-games" width="150" height="150" border="0" /></a></div> <?php endwhile; ?>
but could not figure out how to get the same thing done for tags , for categories i just need to chage the ‘cat’ => 2704 to the desired category id
- The topic ‘custom field from tag pages’ is closed to new replies.