• Resolved James-Taylor

    (@james-taylor-1)


    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 .= ' &middot; ';
    							}
    							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.next

    The 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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author craigramsay

    (@malinkymedia)

    Hi James, Apologies for the delay. Looks like you’ve set it back to the 10 posts so I can’t check out what’s happening on the page as there’s no pagination.

    If you have time to change it back to the 6 as you mentioned and I’ll take a look in the next day or so for you to offer a solution.

    Thanks

    Thread Starter James-Taylor

    (@james-taylor-1)

    Thanks for the reply… I have just set it to show 6 again for you.

    James

    Plugin Author craigramsay

    (@malinkymedia)

    Thanks James, I’m going to have another look at this later it’s a strange one as all the selectors are correct and new posts are being returned but not added on to the end for some reason. I’ll get back to you.

    Thanks

    Thread Starter James-Taylor

    (@james-taylor-1)

    Ok Thanks… let me know if you need anymore details

    Regards

    Plugin Author craigramsay

    (@malinkymedia)

    Hi James, This was a strange one and not sure if it’s because of the :before and :after selectors you’re using.

    The solution is to change the posts selector settings to the ol that wraps the .PortfolioListing li items. You could move the .Portfolio class from the div to be the class name on the ol and try that. Otherwise just add a new class name to act as the target. When on the ol it seemed to work but the testing I can do here is limited.

    <ol class="Portfolio small-block-grid-1 medium-block-grid-2 large-block-grid-2">

    Thanks

    Thread Starter James-Taylor

    (@james-taylor-1)

    Thank you for the update and the solution… I’ve just updated accordingly and sure enough its now working!

    Your help is much appreciated.

    James

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Ajax Calling but Not Loading on Custom Post Archive Page’ is closed to new replies.