• Resolved ratmalwer

    (@ratmalwer)


    Hi Frank

    great plugin!

    (Repost of my topic, as I was in the wrong maintopic. sorry).

    But I have the issue, that the first two posts get duplicated when i activate the slider.
    I explain: I have a blog showing the first 8 posts.
    Post one: only text
    Post two: text and a slide
    Post tree further (lets say only text)

    So activating the slider the first and second post are shown correct. Then the first and second posts are duplicated and the slide shows the loading.png.
    The further posts are shown correctly again.

    see example: http://preview-web02.148935.aweb.preview-site.ch/blog/

    Version. 3.4.4

    Thanks for a reply
    Markus

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter ratmalwer

    (@ratmalwer)

    ADDITIONAL INFORMATION

    I foud out, that calling the slider like this causese the issue. Is there something wrong with this?

    <?php
    $args = array(
    	'posts_per_page' => 8
    );
    query_posts($args);
    			
    if ( have_posts() ) :
    	/* Start the Loop */
    	while ( have_posts() ) : the_post(); 
    		echo the_content();						
    	endwhile; 
    endif;
    ?>
    Plugin Author FARAZFRANK

    (@farazfrank)

    Hi @ratmalwer,

    Are you still have the issue?

    Sorry for the too late.

    You can contact the theme author, it could reset post data after each call will help.

    Thanks

    Thread Starter ratmalwer

    (@ratmalwer)

    @farazfrank

    Hi Frank

    hope you are well!

    I found a workaround, now I cannot reproduce the issue. But I had a new issue witch could be a reason for that or related to it:

    calling the slider the post-id is changing. Look at hte folloing code:

             $args = array( 
                'post_type' => 'ris_gallery',
              	'orderby'          => 'date',
              	'order'            => 'DESC', 
              );   
             $myposts = new WP_Query( $args );
             if ($myposts->have_posts()) :
             	while ( $myposts->have_posts() ) : $myposts->the_post();
             		echo 'ID before='.get_the_ID().'<br>';
    			echo '<h3>' . get_the_title()  .'</h3>';
    
    			echo do_shortcode('[URIS id='.get_the_ID().']');
    	 		
    	 		echo 'ID after is not the same as before='.get_the_ID().'<br><br>';
    		endwhile; 
             	// Restore original Query & Post Data
        		wp_reset_query();
        		wp_reset_postdata();
             endif;		
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘plugin duplicates posts’ is closed to new replies.