• Resolved shooz

    (@shooz)


    First of all thanks for a great plugin, i’ve seen it working flawlessly on other sites, so im pretty sure my problem is due to my specific theme.

    In short, all functions work on my site, however after pressing the load more button, the loaded content appears under the load more button, instead of above it, which means it simply renders page 2 underneath, with page numbers and everything again, however the load more button does not appear again.

    My Themes Loop Code:

    
     <?php // Start the Loop.
    					while ( have_posts() ) : the_post();					
    						get_template_part('content');		
    					endwhile; 		
    					if ($modality_theme_options['simple_paginaton'] == '1') {			
    						// Displays links for next and previous pages. ?>
    						<div class="clear"></div>
    						<div class="simple-pagination">
    							<?php posts_nav_link();	?>
    						</div>  <?php
    					} else {		
    						// Previous/next post navigation. ?>
    						<div class="clear"></div><?php 
    						modality_paging_nav();		
    					} ?>

    I suspect the pagination to be my problem, and i’ve tried several ways to add it before the pagination without success, either it breaks the site, or the load more button dissapears completely.

    It only shows up, when i add it right before or anywhere after the “<?php
    modality_paging_nav();
    } ?>`”

    Please help me get it working properly ??

    • This topic was modified 7 years, 2 months ago by shooz.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Some problem here. The above button remains active. Below the loaded posts there is a dead button.

    Could the developer to help?

    • This reply was modified 7 years, 1 month ago by AgnostosX.
    Plugin Author Idiom

    (@brianbrey)

    Hi,

    Thanks for downloading the plugin. The load more button requires that your post list is wrapped in a container element. When the button is clicked new posts are appended within that element.

    In your Easy Load More Settings, what do you have for the “Post List Wrap Selector” field?

    For example you could set it to “#post-list” and update your template like this:

    
     <div id="post-list">
     <?php // Start the Loop.
    
    					while ( have_posts() ) : the_post();					
    						get_template_part('content');		
    					endwhile; 
    ?>
    </div> <!-- end #post-list -->
    
    <?php
    					if ($modality_theme_options['simple_paginaton'] == '1') {			
    						// Displays links for next and previous pages. ?>
    						<div class="clear"></div>
    						<div class="simple-pagination">
    							<?php posts_nav_link();	?>
    						</div>  <?php
    					} else {		
    						// Previous/next post navigation. ?>
    						<div class="clear"></div><?php 
    						modality_paging_nav();		
    					} ?>
    

    After that, adding the <?php load_more_button(); ?> anywhere outside of the “#post-list” <div> should work.

    I hope that helps solve your issue.

    Thanks!

    OK, finally I managed to make it to work for me. I placed the code just before footer call function and now posts in home page are loaded normally.

    <?php if(function_exists('load_more_button')) { load_more_button(); } ?>
    
    <?php get_footer(); ?>
    Thread Starter shooz

    (@shooz)

    Thanks alot Idiom! That worked beautifully! ??
    If anyone else is using this theme, or any other theme from the same creator, remember to add it in both content-posts-home and content-posts or it won’t work.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Load more content loads after the button’ is closed to new replies.