• Hello,

    Great plugin, I’m using this theme http://demo.aggressivemotions.com/barcelona/
    How it’s possible to load same content with your plugin when a user is in a bottom in every single post?

    below i have post the single.php template from that theme, it may help me and let me know what code need to add in order to ajax load more single page ?

    <?php
    
    $barcelona_is_pw_req = post_password_required();
    
    get_header();
    
    barcelona_breadcrumb();
    
    if ( ! $barcelona_is_pw_req ) {
    	barcelona_featured_img();
    }
    
    ?>
    <div class="<?php echo esc_attr( barcelona_single_class() ); ?>">
    
    	<div class="<?php echo esc_attr( barcelona_row_class() ); ?>">
    
    		<main id="main" class="<?php echo esc_attr( barcelona_main_class() ); ?>">
    
    			<?php if ( have_posts() ): while( have_posts() ): the_post(); ?>
    
    				<article id="post-<?php echo intval( get_the_ID() ); ?>" <?php post_class(); ?>>
    
    					<?php barcelona_featured_img(); ?>
    
    					<?php if ( barcelona_get_option( 'show_content' ) == 'on' ): ?>
    					<section class="post-content">
    					<?php
    
    						the_content();
    
    						if ( ! $barcelona_is_pw_req ) {
    
    							wp_link_pages( array(
    								'before'   => '<div class="pagination"><span class="page-numbers title">' . esc_html__( 'Pages:', 'barcelona' ) . '</span>',
    								'after'    => '</div>',
    								'pagelink' => '%'
    							) );
    
    						}
    
    					?>
    					</section><!-- .post-content -->
    					<?php endif; ?>
    
    					<?php if ( ! $barcelona_is_pw_req ): ?>
    					<footer class="post-footer">
    
    						<?php if ( barcelona_get_option( 'show_tags' ) == 'on' && $barcelona_post_tags = get_the_tags() ): ?>
    						<div class="post-tags">
    							<?php the_tags( '<strong class="title">'. esc_html__( 'Tags:', 'barcelona' ) .'</strong> ' ); ?>
    						</div><!-- .post-tags -->
    						<?php endif; ?>
    
    						<?php
    
    						barcelona_post_voting();
    
    						barcelona_social_sharing();
    
    						barcelona_author_box();
    
    						barcelona_pagination( 'nextprev' );
    
    						barcelona_post_ad();
    
    						comments_template();
    
    						?>
    
    					</footer><!-- .post-footer -->
    					<?php endif; ?>
    
    				</article>
    
    			<?php endwhile; endif; ?>
    
    		</main>
    
    		<?php get_sidebar(); ?>
    
    	</div><!-- .row -->
    
    	<?php barcelona_related_posts(); ?>
    
    </div><!-- .container -->
    <?php
    
    get_footer();

    Please check this example under latest news

    http://goodlife.fuelthemes.net/2015/10/08/tamar-braxton-joins-nick-carter-chaka-khan-andy-grammer-on-dancing-with-the-stars/

    Thank you very much in advnce

    • This topic was modified 9 years, 6 months ago by veggera.
Viewing 1 replies (of 1 total)
  • Plugin Author Darren Cooney

    (@dcooney)

    Hi @veggeras,
    You would need to replace <?php barcelona_related_posts(); ?> with the Ajax Load More shortcode.
    <?php echo do_shortcode('[ajax_load_more]'); ?>

    Note that these are related posts and Ajax Load More does not have the ability to know which posts are related unless you are able to pass in category/tag values.

    Cheers,

Viewing 1 replies (of 1 total)

The topic ‘add custom template’ is closed to new replies.