previous_post Add on duplicate the origin post
-
Hey,
I want to add an infinity scroll to my news site with the option of the previous_post which change the url of the page when you scroll down to other posts. In order to obtain this option I purchased the previous_post add-on. When I am adding the previous_post vars to the short code my origin post is being duplicated, you can see in the attached page.
Here is my shortcode:
echo do_shortcode('[ajax_load_more seo="true" preloaded="false" preloaded_amount="0" images_loaded="true" posts_per_page="3" pause="true" pause_override="true" max_pages="0" transition="fade" css_classes="infinite-scroll" previous_post="true" previous_post_id="'. get_the_ID() .'" post__not_in="'. get_the_ID() .'"]');
I execute it on the editor on the single.php page (I also tried to add it using the ad-inserter plugin). If I remove the attributes of the previous_post: previous_post and previous_post_id it works fine but without changing the url so I’m pretty sure that the problem is in the new add-on.
Just to make sure, I’m adding the repeater template I have created but due to the fact that when I’m removing the previos_post attributes everything is working well I believe that the problem is in the add-on:
<div style="margin-top:80px;"> <div class="page-title"> <h1 class="entry-header page-title"> <?php the_title(); ?> </h1> </div> <div class="entry-meta" style="border-color:#8c8c8c !important; border-top: 1px solid; border-bottom: 3px solid; padding:3px;"> <?php if ( po_single_metadata_show( 'author' ) ) : ?> <span class="entry-user" style="color: #6f6f6f; margin-top: -2px; margin-right: 5px; border-radius: 50%; "><?php echo get_avatar( get_the_author_meta( 'email' ), '24' ); ?>Author: <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" rel="author" class="fn"> <?php echo get_the_author(); ?> </a> </span> <?php endif; ?> <?php if ( po_single_metadata_show( 'date' ) ) : ?> <span class="entry-date" style="color: #6f6f6f;">Last Updated On <?php echo get_the_last_modified_timestamp();?> </span> <?php endif; ?> <?php if ( po_single_metadata_show( 'comments' ) ) : ?> <span class="entry-comment"><?php comments_popup_link( __( 'No Comments', 'pojo' ), __( 'One Comment', 'pojo' ), __( '% Comments', 'pojo' ), 'comments' ); ?></span> <?php endif; ?> </div> <div style="margin-top:20px;"> <?php the_content(); ?> </div> <?php if ( pojo_is_show_about_author() ) : ?> <div class="author-info media"> <div class="author-info-inner"> <h3 class="author-title"><?php _e( 'About the Author', 'pojo' ); ?></h3> <div class="author-avatar pull-left"> <a href="<?php the_author_meta( 'user_url' ); ?>"> <?php echo get_avatar( get_the_author_meta( 'email' ), '90' ); ?> </a> </div> <div class="author-content media-body"> <h4 class="author-name"> <?php the_author_meta( 'user_firstname' ); ?> <?php the_author_meta( 'user_lastname' ); ?> <small> <a class="author-link" href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" rel="author" class="fn"> <?php _e( 'View all posts by', 'pojo' ); ?> <?php echo get_the_author(); ?> </a> </small> </h4> <p class="author-bio"> <?php echo nl2br( get_the_author_meta( 'description' ) ); ?><br /> </p> </div> </div> </div> <?php endif; ?> </div> <hr>
I also sent a support message to the company, but so far I didn’t get any replay.
Thanks in advance
The page I need help with: [log in to see the link]
- The topic ‘previous_post Add on duplicate the origin post’ is closed to new replies.