Revision: 39860
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at January 21, 2011 23:32 by nachuge
Initial Code
<!-- GALLERY VIEW-->
<div class="gallery">
<?php
$mainGallery = new WP_Query();
$mainGallery->query('post_type=post&showposts=5');
$i=1;
?>
<?php while ($mainGallery->have_posts()) : $mainGallery->the_post();
$mainGalleryPic = get_children(array(
'post_parent' => get_the_ID(),
'post_type' => 'attachment',
'numberposts' => 1,
'order' => 'DESC',
'orderby' => 'date',
'post_mime_type' => 'image'));
foreach($mainGalleryPic as $listele ) {
$img=wp_get_attachment_image_src($listele->ID, 'mainProjects');
$cap=$listele->post_title;
}
?>
<!-- BLOCK -->
<div class="block <?php if($i==1) { echo 'noBg noPadl'; } elseif($i==5) { echo 'noMarr'; } ?>">
<h2>NEWEST</h2>
<h3><?php the_title(); ?></h3>
<h4>Online</h4>
<div class="thumb <?php if($i%2==0) { echo 'small'; } else { echo 'full'; } ?>">
<img src="<?php echo $img[0]; ?>" alt="<?php the_title(); ?>">
</div>
<p><?php echo substr(get_the_content(),0,110); ?></p>
<a href="<?php the_permalink(); ?>">Click for more</a>
</div>
<!-- /BLOCK -->
<?php $i++; endwhile; ?>
</div>
<!-- /GALLERY VIEW-->
Initial URL
Initial Description
Initial Title
wordpress resimli haber
Initial Tags
Initial Language
PHP