Return to Snippet

Revision: 9478
at November 9, 2008 13:00 by davebowker

Initial Code
<?php $headerimage = get_posts('showposts=3&meta_key=headerimage'); foreach($headerimage as $post) : setup_postdata($post); ?>
<div id="header-image"><a href="<?php the_permalink(); ?>" title="Latest experiment from the DesignLab"><img src="<?php echo get_post_meta($post->ID, "headerimage", true); ?>" alt="" border="0" /></a></div>
<?php endforeach; ?>

Initial URL

Initial Description

Initial Title
WordPress query posts of certain custom field values

Initial Tags
wordpress, query

Initial Language