Title: Duplicating post
Last modified: August 31, 2016

---

# Duplicating post

 *  Resolved [gogomx](https://wordpress.org/support/users/gogomx/)
 * (@gogomx)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/duplicating-post/)
 * Im using a loop with 3 posts per row.Right now, shows the firsts 3.
 * > <div id=”gridcontainer”>
   >  <?php $counter = 1;
   >  $grids = 3;
   >  global $query_string;
   >  query_posts($query_string . ‘&caller_get_posts=1&posts_per_page=3’);
   >  if(have_posts()) : while(have_posts()) : the_post();
   >  ?> <?php
   >  if($counter == 1 || $counter == 2):
   >  ?> <div class=”griditemleft”> <div class
   > =”postimage”> ” title=”<?php the_title_attribute(); ?>”><?php the_post_thumbnail(‘
   > category-thumbnail’); ?> <h1>” title=”<?php the_title_attribute(); ?>”><?php
   > the_title(); ?></h1> </div> </div> <?php elseif($counter == $grids) : ?> <div
   > class=”griditemright”> <div class=”postimage”> ” title=”<?php the_title_attribute();?
   > >”><?php the_post_thumbnail(‘category-thumbnail’); ?> <h1>” title=”<?php the_title_attribute();?
   > >”><?php the_title(); ?></h1> </div>
   >  </div>
   >  <div class=”clear”></div> <?php $counter = 0; endif; ?> <?php $counter
   > ++; endwhile; //wp_pagenavi(); endif; ?>
   >  </div><!–FIN gridcontainer–>
 * Doesn´t matter what parameters using on the shortcode builder, allways shows 
   and duplicate several times the first 3 posts.
 * It tried offset:1,2,3,4,5… and nothing, i can not be able to solve it. What am
   i doing wrong?
 * [https://wordpress.org/plugins/ajax-load-more/](https://wordpress.org/plugins/ajax-load-more/)

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Author [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * (@dcooney)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/duplicating-post/#post-6903706)
 * Hi,
    What is this code example? How are you using this?
 * Can you share your repeater template?
 *  Thread Starter [gogomx](https://wordpress.org/support/users/gogomx/)
 * (@gogomx)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/duplicating-post/#post-6903734)
 * Hi dcooney, thanks for reply.
 * The code above is the loop on my theme, and if im not stupid what i understand
   about your plugin, i pasted the same code on the repeater template.
 * Is that correct?
 *  Plugin Author [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * (@dcooney)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/duplicating-post/#post-6903776)
 * Your Repeater Template should simply be:
 *     ```
       <div class="griditemleft">
       <div class="postimage">
       " title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail('category-thumbnail'); ?>
       <h1>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></h1>
       </div>
       </div>
       ```
   
 * Ajax load more takes care of the loop.
 *  Thread Starter [gogomx](https://wordpress.org/support/users/gogomx/)
 * (@gogomx)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/duplicating-post/#post-6903812)
 * Oh thank you!!! it works as a charm.
 * 2 more issues.
 * If i click on first (lastest) post, when loads the single.php the load more button
   appears and load the home posts automatically. It only happens in the first post.
 * Second issue, well is more as a question, im using the button to load more posts,
   how to change the style (width) and text of the button?
 *  Plugin Author [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * (@dcooney)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/duplicating-post/#post-6903835)
 * No problem!
 * 1 – sorry, i’m not sure what you mean. Do you mean you want it paused? If so,
   set pause=”true” in your shortcode.
    2 – you need to create some custom css to
   change the button style.
 *  Thread Starter [gogomx](https://wordpress.org/support/users/gogomx/)
 * (@gogomx)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/duplicating-post/#post-6903851)
 * Sorry, the first question was my mistake, i inserted the ajax load more shortcode
   on the post.
 * About styling the button, do i have to create the custom css on theme´s style.
   css or modify the plugin´s css?
 *  Plugin Author [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * (@dcooney)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/duplicating-post/#post-6903852)
 * I wouldnt modify plugin. I’d suggest creating your own in the theme css file.
 *  Thread Starter [gogomx](https://wordpress.org/support/users/gogomx/)
 * (@gogomx)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/duplicating-post/#post-6903853)
 * Another issue.
 * On Adjustments – Read – Max number of post – I set 9
 * Then on Shortcode Bulider i set offset: 9 and posts_per_page=”9″
 * I use as grid with 3 posts per row, the first row is ok, the second row just 
   shows 2 posts and the third post is another row below. Same with 6 to 9 posts,
   they are shown in two rows.
 * Then when i click on button, the next 9 shows over the footer. They are outside
   the div wich contains the posts.
 *  Plugin Author [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * (@dcooney)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/duplicating-post/#post-6903873)
 * This would be a CSS issue in your theme and not the plugin.
 * You likely need to create some custom styles specifically for your content.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Duplicating post’ is closed to new replies.

 * ![](https://ps.w.org/ajax-load-more/assets/icon-256x256.png?rev=2944639)
 * [Ajax Load More – Infinite Scroll, Load More, & Lazy Load](https://wordpress.org/plugins/ajax-load-more/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ajax-load-more/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ajax-load-more/)
 * [Active Topics](https://wordpress.org/support/plugin/ajax-load-more/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ajax-load-more/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ajax-load-more/reviews/)

 * 9 replies
 * 2 participants
 * Last reply from: [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * Last activity: [10 years, 5 months ago](https://wordpress.org/support/topic/duplicating-post/#post-6903873)
 * Status: resolved