Кнопка "Показать еще" грузит те же посты, в чем ошибка?
Вот код главной
<!-- main content start -->
<div class="mainwrap blog <?php if(is_front_page()) echo 'home' ?> <?php if(!amory_globals('use_fullwidth')) echo 'sidebar' ?> grid">
<div class="main clearfix">
<div class="content blog">
<?php if(is_front_page()) { ?>
<div id="pmc-tabs">
<ul>
<li><a class="tab1" href="#tabs-1"><?php esc_html_e('Information','amory'); ?></a></li>
<li><a class="tab2" href="#tabs-2"><?php esc_html_e('News/Updates','amory'); ?></a></li>
</ul>
<div class="pmc-tabs">
<?php if(is_front_page()) { ?>
<div id="tabs-1" >
<?php get_template_part('infor', 'latest-post'); ?>
</div>
<?php } ?>
<?php if(is_front_page()) { ?>
<div id="tabs-2" >
<?php get_template_part(news); ?>
</div>
<?php } ?>
</div></div>
<?php } ?>
<?php if(is_category()) { ?>
<div id="tabs-1">
<?php get_template_part('category_grid_latest','latest-post'); ?></div>
<?php } ?>
<div class="infinity-more"><?php esc_html_e('Load more posts','amory'); ?></div>
<div class="navi-grid">
<?php
get_template_part('includes/wp-pagenavi','navigation');
if(function_exists('amory_wp_pagenavi')) { amory_wp_pagenavi(); }
?>
</div>
</div>
<!-- sidebar -->
<?php if(!amory_globals('use_fullwidth')) { ?>
<div class="sidebar">
<?php dynamic_sidebar( 'amory_sidebar' ); ?>
</div>
<?php } ?>
</div>
</div>
Вот код из первого таба, с котого грузит те же самые посты
<?php
$amorypop = new WP_Query( array( 'category_name' => 'information' , 'order' => 'DESC' , 'post_type' => 'post' ) );
?>
<?php if ($amorypop->have_posts()) : ?>
<?php $do_not_duplicate = array(); $i = 6;?>
<?php while ($amorypop->have_posts()) : $amorypop->the_post();
if ( in_array( get_the_id(), $do_not_duplicate ) ) { continue; }
$do_not_duplicate[$i++] = get_the_id();
?>
<?php if(is_sticky(get_the_id())) { ?>
<div class="amory_sticky">
<?php } ?>
<?php
$postmeta = get_post_custom(get_the_id());
if ( has_post_format( 'video' , get_the_id())) { ?>
<div class="slider-category">
<div class="blogpostcategory">
<?php
if(!empty($postmeta["video_post_url"][0])) {
$embed_code = wp_oembed_get(esc_url($postmeta["video_post_url"][0]),array('width'=>300,'height'=>200));
echo $embed_code ;
} ?>
<?php get_template_part('includes/boxes/loopBlogGrid','single'); ?>
</div>
</div>
<?php }
if ( has_post_format( 'link' , get_the_id())) {
$postmeta = get_post_custom(get_the_id());
if(isset($postmeta["link_post_url"][0])){
$link = $postmeta["link_post_url"][0];
} else {
$link = "#";
}
?>
<div class="link-category">
<div class="blogpostcategory">
<?php if(amory_getImage(get_the_id(), 'amory-postBlock') != '') { ?>
<a class="overdefultlink" href="<?php echo esc_url($link) ?>">
<div class="overdefult">
</div>
</a>
<div class="blogimage">
<div class="loading"></div>
<a href="<?php echo esc_url($link) ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php echo amory_getImage(get_the_id(), 'amory-postBlock'); ?></a>
</div>
<?php } ?>
<?php get_template_part('includes/boxes/loopBlogLink','single'); ?>
</div>
</div>
<?php
}
if ( has_post_format( 'quote' , get_the_id())) {?>
<div class="quote-category">
<div class="blogpostcategory">
<?php get_template_part('includes/boxes/loopBlogQuote','single'); ?>
</div>
</div>
<?php
}
?>
<?php if ( has_post_format( 'audio' , get_the_id())) {?>
<div class="blogpostcategory">
<div class="audioPlayerWrap">
<div class="audioPlayer">
<?php
if(isset($postmeta["audio_post_url"][0]))
echo do_shortcode('[soundcloud params="auto_play=false&hide_related=false&visual=true" width="100%" height="150"]'. esc_url($postmeta["audio_post_url"][0]) .'[/soundcloud]') ?>
</div>
</div>
<?php get_template_part('includes/boxes/loopBlogGrid','single'); ?>
</div>
<?php
}
?>
<?php if ( !get_post_format() || has_post_format( 'gallery' , get_the_id())) {?>
<div class="blogpostcategory">
<?php if(amory_getImage(get_the_id(), 'amory-postBlock') != '') { ?>
<a class="overdefultlink" href="<?php the_permalink() ?>">
<div class="overdefult">
</div>
</a>
<div class="blogimage">
<div class="loading"></div>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php echo amory_getImage(get_the_id(), 'amory-postBlock'); ?></a>
</div>
<?php } ?>
<?php get_template_part('includes/boxes/loopBlogGrid','single'); ?>
</div>
<?php } ?>
<?php if(is_sticky()) { ?>
</div>
<?php } ?>
<?php endwhile; ?>
<?php endif; ?>
<?php wp_reset_postdata(); ?>
На странице отдельной категории, кнопка работает нормально и грузит как положено.