Code Placement
-
Hi..
I just installed the plugin but can’t seem to get it to work.
I have set up an example tag page and placed the code as suggested but all posts get loaded and the “load more” button appears at end of the page and disabled.
The theme I use has pagination option and the load more doesn’t seem to work regardless of the number of posts I set it to show per page. so if I set post per page to 20, the page loads 20 and load more is still disabled.
Can you please advise on how to configure the code and the paging settings?
Your help and support is much appreciated.
Here is a link to the example tag page: https://www.hydardewachi.com/tag/photography/
Theme: https://www.wpexplorer.com/pronto-wordpress-theme/
and here is the code:
<div id="primary" class="content-area clr"> <div id="content" class="site-content" role="main"> <?php if ( have_posts() ) : ?> <div id="infinite-wrap" class="grid clr"> <?php while ( have_posts() ) : the_post(); ?> <?php get_template_part( 'content', get_post_format() ); ?> <?php endwhile; ?> </div><!-- .grid --> <?php $tag = get_query_var('tag'); echo do_shortcode('[ajax_load_more tag="'.$tag.'"]'); ?> <?php wpex_pagination(); ?> <?php else : ?> <?php get_template_part( 'content', 'none' ); ?> <?php endif; ?> </div><!-- #content --> </div><!-- #primary -->
- The topic ‘Code Placement’ is closed to new replies.