'Ajax-pagination plugin not working (WordPress)
How to make pagination without reloading the page?
Used the plugin: https://wordpress.org/plugins/wp-ajax-pagination/
and WordPress pagination the_posts_pagination();
But ajax-pagination still doesn't work for me =(
⠀⠀⠀
category.php file code:
<?php get_header(); ?>
<main class="Main_ContentKg">
<section>
<div class="Block-1">
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post();?>
<div class="child-block-1"> // ****** I set this block in plugin settings ******
<a class ="child_Link_1" href=<?php the_permalink(); ?>> </a>
<img class="child-img-1" src=<?php the_post_thumbnail('post-page'); ?>
<figcaption class ="child-text">
<div class="child-text-center">
<?php the_title();?>
</div>
</figcaption>
</div>
<?php endwhile; ?>
</div>
<?php
$pagin_args = array(
'show_all' => false,
'end_size' => 2,
'mid_size' => 1,
'prev_next' => false,
'prev_text' => __('« Next'),
'next_text' => __('Back »'),
'add_args' => false,
'add_fragment' => '',
'screen_reader_text' => __( 'Posts navigation' ),
);
?>
<?php the_posts_pagination($pagin_args); ?> // ****** Оriginal Wordpress pagination ******
</section>
</main>
<?php endif; ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

