This repository has been archived on 2020-05-08. You can view files and clone it, but cannot push or open issues or pull requests.
understrap/sticky.php

25 lines
790 B
PHP
Raw Normal View History

2015-08-12 11:09:30 +00:00
<?php while (have_posts()) : the_post(); ?>
<?php if (!is_sticky()) continue; ?>
2015-03-23 12:48:34 +00:00
<!-- ******************* The Sticky Area ******************* -->
<div class="wrapper" id="wrapper-sticky">
2015-03-23 10:33:03 +00:00
<div class="container">
<div class="col-md-12">
<?php
2015-08-12 11:06:37 +00:00
$sticky = get_option( 'sticky_posts' );
$args = array(
'posts_per_page' => 1,
'post__in' => $sticky,
'ignore_sticky_posts' => 1
);
$query = new WP_Query( $args );
if ( isset($sticky[0]) ) {
get_template_part( 'content', get_post_format() );
}
2015-08-12 11:24:29 +00:00
wp_reset_query();
2015-08-12 11:06:37 +00:00
?>
2015-03-23 12:48:34 +00:00
</div>
2015-03-23 10:33:03 +00:00
</div>
</div>
2015-08-12 11:09:30 +00:00
<?php endwhile; ?>
2015-03-23 10:33:03 +00:00