home page sticky loop
This commit is contained in:
parent
c6706f3f48
commit
bdc22c7ad4
0
dev.sync.sh
Normal file → Executable file
0
dev.sync.sh
Normal file → Executable file
@ -1,3 +1,3 @@
|
|||||||
<footer class="container">
|
<footer class="container">
|
||||||
<?php ildi_nav('footer-menu'); ?>
|
<?php ildi_nav('social-menu'); ?>
|
||||||
</footer>
|
</footer>
|
||||||
|
@ -11,7 +11,7 @@ if (function_exists('add_theme_support')) {
|
|||||||
// add_image_size('custom-size', 700, 200, true); // call using the_post_thumbnail('custom-size');
|
// add_image_size('custom-size', 700, 200, true); // call using the_post_thumbnail('custom-size');
|
||||||
|
|
||||||
$customHeaderArgs = array(
|
$customHeaderArgs = array(
|
||||||
'default-image' => get_template_directory_uri() . '/images/default-header.png',
|
'default-image' => get_template_directory_uri() . '/images/default-header.jpg',
|
||||||
'width' => 1800,
|
'width' => 1800,
|
||||||
'height' => 260,
|
'height' => 260,
|
||||||
'flex-height' => true,
|
'flex-height' => true,
|
||||||
|
@ -1,18 +1,27 @@
|
|||||||
<div class="grid xs-col-100 sm-col-50 md-col-33 grid-gutter-lg">
|
<div class="grid xs-col-100 sm-col-50 md-col-33 grid-gutter-lg">
|
||||||
<?php
|
<?php
|
||||||
if ( have_posts() ) {
|
|
||||||
while ( have_posts() ) {?>
|
$sticky = get_option( 'sticky_posts' );
|
||||||
|
$args = array(
|
||||||
|
'posts_per_page' => 10,
|
||||||
|
'post__in' => $sticky,
|
||||||
|
'ignore_sticky_posts' => 1
|
||||||
|
);
|
||||||
|
$query = new WP_Query( $args );
|
||||||
|
|
||||||
|
if ( isset($sticky[0]) && $query->have_posts() ) {
|
||||||
|
while ( $query->have_posts() ) {
|
||||||
|
$query->the_post(); ?>
|
||||||
<section class="home-loop">
|
<section class="home-loop">
|
||||||
<a href="<?php echo get_page_link(); ?>"><?php
|
<a href="<?php echo get_page_link(); ?>"><?php
|
||||||
the_post();
|
|
||||||
the_title( '<h1>', '</h1>' );
|
the_title( '<h1>', '</h1>' );
|
||||||
the_post_thumbnail();
|
the_post_thumbnail();
|
||||||
// the_excerpt();
|
// the_excerpt();
|
||||||
?></a>
|
?></a>
|
||||||
</section>
|
</section>
|
||||||
<?php }
|
<?php }
|
||||||
|
|
||||||
get_template_part('pagination');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wp_reset_postdata();
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user