Answer the question
In order to leave comments, you need to log in
Ajax pagination not working on main WP?
There are 2 plugins
WP-PageNavi - popular for displaying pagination
and
WP Ajax Load More Pagination - ajax page loading
It works fine on the archives page, but on the main page it outputs via WP_query
<div id="masonry">
<?php
$args = array(
'post_type' => 'post',
'posts_per_page' => 6,
'orderby' => 'date',
'order' => 'DESC',
);
$q = new WP_Query($args);
?>
<?php if ( $q->have_posts() ) : ?>
<?php while ( $q->have_posts() ) : $q->the_post(); ?>
<div class="item">
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
</div>
<?php endwhile; ?>
<?php endif; ?>
</div>
<?php wp_pagenavi( array( 'query' => $q ) ); ?>
Answer the question
In order to leave comments, you need to log in
Decision
<?php
$paged = (get_query_var('page')) ? get_query_var('page') : 1;
$args = array(
'post_type' => 'post',
'posts_per_page' => 6,
'orderby' => 'date',
'paged' => $paged,
'order' => 'DESC',
);
$q = new WP_Query($args);
?>
If you are using sass, then the bootstrap.scss file contains the assembly bundle.
_navbar.scss is responsible for styling the navbar.
If you also connect js separately, then jquery + utils + dropdown + collapse is used in the navbar
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question