• 24-08-2012, 22:55:11
    #1
    Kimlik doğrulama veya yönetimden onay bekliyor.
    Arkadaşlar wordpress'de resimleri sürekle yöntemiyle toplu olarak yükleyebiliyorum, ama yüklediğim resimleri toplu olarak yazıya dahil edemiyorum.Sizin bildiğiniz bir yöntem var mı?

    Yardımlarınızı bekliyorum.
  • 25-08-2012, 10:10:50
    #2
    single.php içinde şunu ekleyerek tüm yazılarınız için resimleri alabilmeniz olası.

    <?php if ( $post->post_type == 'post' && $post->post_status == 'publish' ) {
    		$attachments = get_posts( array(
    			'post_type' => 'attachment',
    			'posts_per_page' => -1,
    			'post_parent' => $post->ID,
    			'exclude'     => get_post_thumbnail_id()
    		) );
    
    		if ( $attachments ) {
    			foreach ( $attachments as $attachment ) {
    				$class = "post-attachment mime-" . sanitize_title( $attachment->post_mime_type );
    				$thumbimg = wp_get_attachment_link( $attachment->ID, 'thumbnail-size', true );
    				echo '<li class="' . $class . ' data-design-thumbnail">' . $thumbimg . '</li>';
    			}
    			
    		}
    	}
    ?>
    kaynak : http://www.wpbeginner.com/wp-themes/...eatured-image/