How to have a featured-article-image on the frontpage
-
Hi, im not a good with PHP so I hope you guys can help me.
Here is my problem/question: I want to have a featured-article-image on the frontpage. Like the featured-article gallery plugin but this time with only one photo.
Im now using
<?php query_posts('showposts=1'); ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <?php $thumbnail = get_post_meta($post->ID, 'imgboard', true); ?> <li> <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"> <img src="<?php echo $imgboard; ?>" alt="<?php the_title(); ?>" /> </a> </li> <?php endwhile; endif; ?>
But that doesnt work, the result is just a title of the latest post (because not all the article’s have the customfield ‘imgboard’ does somebody know how I can get this?
so in short: I just want the image (customfield: imgboard) of the latest post on the frontpage
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘How to have a featured-article-image on the frontpage’ is closed to new replies.