remove sticky if nothing

This commit is contained in:
Holger Könemann 2015-08-12 12:54:53 +02:00
parent c97a54c55a
commit dd21aabb27
2 changed files with 5 additions and 1 deletions

View File

@ -15,7 +15,10 @@ 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; ?>
<div class="wrapper" id="wrapper-index">

View File

@ -3,6 +3,7 @@
<div class="container">
<div class="col-md-12">
<?php
// Get IDs of sticky posts
$sticky = get_option('sticky_posts');