Skip to content

Commit

Permalink
Fix incorrect front page carousel permalinks
Browse files Browse the repository at this point in the history
  • Loading branch information
query committed Mar 1, 2011
1 parent 189396a commit 3f98ba4
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions front-page.php
Expand Up @@ -63,20 +63,27 @@
<ul class="carousel jcarousel-skin-none">
<?php
foreach ($featured_pages as $featured_page) {
$featured_query = new WP_Query(array('page_id' => $featured_page));

if ($featured_query->have_posts()) {
$featured_query->the_post();
?>
<li>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<a href="<?php echo the_permalink(); ?>" rel="bookmark">
<figure>
<?php echo get_the_post_thumbnail($featured_page, 'post-thumbnail', array('alt' => '', 'title' => '')); ?>
<?php echo get_the_post_thumbnail($post->ID, 'post-thumbnail', array('alt' => '', 'title' => '')); ?>
</figure>
<h1><?php echo get_the_title($featured_page); ?></h1>
<div class="excerpt"><?php echo get_post_meta($featured_page, 'excerpt', true); ?></div>
<h1><?php echo the_title(); ?></h1>
<div class="excerpt"><?php echo get_post_meta($post->ID, 'excerpt', true); ?></div>
</a>
</article>
</li>
<?php
}
}

wp_reset_postdata();
?>
</ul>
</section> <!-- #home-featured -->
Expand Down Expand Up @@ -107,4 +114,4 @@
</div> <!-- #home-secondary -->
</div> <!-- #content -->

<?php get_footer(); ?>
<?php get_footer(); ?>

0 comments on commit 3f98ba4

Please sign in to comment.