Ajax is not working for custom pagination
-
On WordPress Ajax Pagination Plugin Pagination is working,But Ajax is Not working.(custom Post type).
Here is my code<div id=”webminar-section” class=”total_ondemand_webinars”>
<div class=”container “>
<?php
// Set custom paged query.
$paged1 = isset($_GET[‘paged1’]) ? (int)$_GET[‘paged1’] : 1;
$args = array(
‘post_type’ => ‘ondemand_webinars’,
‘orderby’ => ‘date’,
‘order’ => ‘DSC’,
‘posts_per_page’ => 2,
‘paged’ => $paged1,
‘post_status’ => ‘publish’
);
$query = new WP_Query($args);
$count = $query->post_count;
?>
<?php if ($query->have_posts()) { ?>
<?php
while ($query->have_posts()) {
$query->the_post();
$id = get_the_ID();
$single_register_button = get_field(‘register_button_text’);
?>
<div class=”row single_post_ondemand_webminar”>
<div class=”col-md-12″>
<div class=”webminar”>
<div class=”icon”>
“>
</div>
<div class=”n-content”>
“>
<?php the_title(); ?>
<?php
$dt = date(“l, F d, Y”, strtotime($single_date_and_time));
if (date(“i”, strtotime($single_date_and_time)) == 0) {
$t = date(“g a”, strtotime($single_date_and_time));
$ampm = str_replace(array(“am”, “pm”), array(“a.m.”, “p.m.”), $t);
} else {
$t = date(“g : i A”, strtotime($single_date_and_time));
$ampm = str_replace(array(“am”, “pm”), array(“a.m.”, “p.m.”), $t);
}
?> <br/>
<span>
<?php
//echo $dt . “<br/>” . $ampm . ” CT<br/>”;
//echo “Duration : ” . $single_duration;
?>
</span>
<p><?php the_excerpt(); ?></p>
<a target=”blank”
href=”<?php echo get_site_url(); ?>/webinar-contact?id=<?php echo $id; ?>”
class=”register”>
<?php echo $single_register_button; ?><!– ” class=”register”>
<?php echo $single_register_button; ?>
–>
</div>
</div>
</div>
</div>
<?php} //endwhile
?>
<?php
// Set the pagination args.
$paginateArgs = array(
‘format’ => ‘?paged1=%#%’,
‘current’ => $paged1, // Reference the custom paged query we initially set.
‘total’ => $query->max_num_pages // Max pages from our custom query.
); ?>
<!– Wrap the pagination –>
<div class=”navigation ” role=”navigation”>
<ul class=”pagination “>- <?php echo paginate_links($paginateArgs); ?>
</div>
<?php
} else {
/* $update_post = array(
‘post_type’ => ‘ondemand_webinars’,
‘ID’ => $id,
‘post_status’ => ‘draft’
);
$statusTest = wp_update_post($update_post); */
no_webinar_text();
} //endfor
?>
</div></div>
How to Fix this?I include in plugin settings
Posts Selector .total_ondemand_webinarsPost Selector .single_post_ondemand_webminar
Navigation Selector .navigation
Next Selector .navigation a.next
Please help me..Thanks In advance
- The topic ‘Ajax is not working for custom pagination’ is closed to new replies.