• Hello,
    very nice work !

    But when not using your plugin my front page is like this :

    POST 1
    POST 2
    POST 3
    POST 4

    PAGE 2 / 3 / 4

    When adding this code to my template

    <? echo do_shortcode('[ajax_load_more post_type="post" repeater="default" transition="fade" offset="4" button_label="Chargement des articles"]');?>

    just brefore the pagination code, it becomes like this :

    POST 1
    POST 2
    POST 3
    POST 4
    POST 5
    POST 6
    POST 7
    POST 8
    POST 9

    LOAD MORE

    What’s wrong please ? (I wanted only 4 posts on my webpage before loading more)

    Thank you.

    Template is :

    <?php
    			$thumb = get_post_thumbnail_id();
    			$img_url = wp_get_attachment_url( $thumb,'full' ); //get full URL to image (use "large" or "medium" if the images too big)
    			$image = aq_resize( $img_url, 740, 430, true ); //resize & crop the image
    		?>
    
    		<?php if($image) : ?>
    			<a href="<?php the_permalink(); ?>"><img class="postimg" src="<?php echo $image ?>"/></a>
    		<?php endif; ?>		
    
    	<header class="entry-header">
    
    		<h1 class="entry-title">>>&nbsp;<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Lien vers %s', 'fabthemes' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark">
    <font color="#DF1011"><?php the_title(); ?></a></h1></font>
    
    	</header><!-- .entry-header -->
    
    	<div class="entry-summary">
    		<?php the_excerpt(); ?>
    	</div>

    https://www.ads-software.com/plugins/ajax-load-more/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Adding Shortcode add 5 fixed posts before "Load More" button’ is closed to new replies.