Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter sherbert99

    (@sherbert99)

    I got it.

    <?php include('blog/wp-blog-header.php');  ?> 
    
    <?php
    
    $args = array(
    	'post_type' => 'attachment',
    	'numberposts' => 5,
    	'post_status' => null,
    	'post_parent' => null, // any parent
    	);
    $attachments = get_posts($args);
    if ($attachments) {
    	foreach ($attachments as $post) {
    
     ?>
    
    <?php
    	setup_postdata($post);
    
    	if(get_the_ID() == "62") {  
    
    	the_attachment_link($post->ID, true);
    	 $withcomments = true; comments_template();
    	 }
    ?>
    
    <?php
    
    	}
    }
    ?>
Viewing 1 replies (of 1 total)