Trying to get a hero area up on my clients home display the most recent sticky post, but I keep seeming to hit a snag. Error right at the end of the code which is making me get the white screen on death. Here's my code:
<?php if (is_home()) {
$sticky = get_option( 'sticky_posts' ); // Get all sticky posts
rsort( $sticky ); // Sort the stickies, latest first
$sticky = array_slice( $sticky, 0, 1 ); // Number of stickies to show
query_posts( array( 'post__in' => $sticky, 'caller_get_posts' => 1 ) ); // The query
if (have_posts() ) { while ( have_posts() ) : the_post(); ?>
<div class="trend-post">
<div class="thumb"><?php the_post_thumbnail(); ?></div>
<div class="title"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></div></div>
<?php endwhile;?>
<?php wp_reset_query()?>
}
?>