sticky check1

This commit is contained in:
Holger Könemann 2015-08-12 13:02:59 +02:00
parent dd21aabb27
commit 027df57a2b
2 changed files with 2 additions and 7 deletions

View File

@ -15,10 +15,7 @@ get_header(); ?>
<?php get_template_part('hero'); ?>
<?php while (have_posts()) : the_post(); ?>
<?php if (!is_sticky()) continue; ?>
<?php get_template_part('sticky'); ?>
<?php endwhile; ?>
<?php get_template_part('sticky'); ?>
<div class="wrapper" id="wrapper-index">

View File

@ -2,8 +2,6 @@
<div class="wrapper" id="wrapper-sticky">
<div class="container">
<div class="col-md-12">
<?php
// Get IDs of sticky posts
$sticky = get_option('sticky_posts');
@ -18,6 +16,7 @@
// Get only the most recent
'posts_per_page' => 1
));
while ($most_recent_sticky_post->have_posts()) : $most_recent_sticky_post->the_post(); ?>
<?php
/* Include the Post-Format-specific template for the content.
@ -27,7 +26,6 @@
get_template_part( 'content', get_post_format() );
?>
<?php endwhile; wp_reset_query(); ?>
</div>
</div>
</div>