Support » Fixing WordPress » Last attachment post duplicating

  • Trying to trouble shoot why the last attachment in our post is duplicating. Example post:

    Here is the code that is generating the attachments

    $args = array(
    	'post_type' => 'attachment',
    	'post_mime_type' => 'audio/mpeg',
    	'numberposts' => -1,
    	'orderby' => 'menu_order',
    	'order'  => 'ASC',
    	'post_status' => null,
    	'post_parent' => $post->ID, // this post
    <!--This is where the audio attachments will go -->
    <?php $posts = get_posts($args);
    foreach ($posts as $post) : start_wp(); ?>
    <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a>
    <?php endforeach; ?>
                                <!--This is the end of the audio attachments -->


  • The topic ‘Last attachment post duplicating’ is closed to new replies.