Ajax Calling but Not Loading on Custom Post Archive Page
-
I’m using the plugin for the first time and think I have it setup correct with the selectors. The load more button is being generated in place of the standard pagination links, when clicked the icon spins but nothing is then loaded?
I’m trying to implement the usage on a custom post archive page ( https://www.worthdeveloping.co.uk/portfolio/ ) if it makes any difference?
Code for page:
<div id="ContentSection" class="row Portfolio"> <?php if ( have_posts() ) : ?> <div class="small-24 columns"> <ol class="small-block-grid-1 medium-block-grid-2 large-block-grid-2"> <?php while ( have_posts() ) : the_post(); ?> <li class="PortfolioListing"> <div class="ListingHolder"> <?php echo wp_get_attachment_image(get_field('archive_listing_background'), full); ?> <div class="ListingDetails"> <div class="v-center"> <h2><?php the_title(); ?></h2> <?php $terms = get_the_terms( get_the_ID(),'portfolio_category' ); ?> <?php $count = count( $terms ); ?> <?php $i = 0; ?> <?php $term_output = '<p class="Categories">'; foreach ($terms as $term) { $i++; $term_output .= $term->name; if ($count != $i) { $term_output .= ' · '; } else { $term_output .= '</p>'; }} ?> <?php echo $term_output; ?> <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">View Project</a> </div> </div> </div> </li> <?php endwhile; ?> </ol> </div> <?php endif; ?> <!-- Add the pagination functions here. --> <?php the_posts_pagination(); ?> </div>
The selectors I have specified are:
Posts Selector: .Portfolio
Post Selector : .PortfolioListing
Navigation Selector : .navigation
Next Selector : .nav-links a.nextThe pagination works with the plugin deactivated.
For the purposes of getting the plugin functioning I have reduced the posts displayed to 6… there are currently a further 4 items which should be displayed when the load more / pagination functionality initiates.
Any advice / thoughts?!
James
- The topic ‘Ajax Calling but Not Loading on Custom Post Archive Page’ is closed to new replies.