WordPress.org

Ready to get started?Download WordPress

Forums

Help with latest images (3 posts)

  1. Ryan Paco
    Member
    Posted 3 years ago #

    Hi can anyone please help me how to show latest images from posts for my photo gallery carousel. currently it's showing the latest posts images, if possible, i only wanted latest images from posts which have image on it.

    please take a look on latest images in the middle of the page, you will see that there's one post which has no image:
    http://www.ezypublishing.com/site1/

    this is the code:

    <div class="container">
    					<ul>
    						<?php
    						$count =1;
    						$gabquery = new WP_Query();$gabquery->query('showposts='.$trns_options["postCountPhotoBar"]);
    						while ($gabquery->have_posts()) : $gabquery->the_post();
    						?>
    						<li class="car">
    							<div class="thumb">
    								<?php
    								gab_media(array(
    									'name' => 'mainpage_photogal',
    									'enable_video' => '1',
    									'enable_thumb' => '1',
    									'media_width' => '150',
    									'media_height' => '113',
    									'thumb_align' => 'alignnone',
    									'enable_default' => $trns_options["enthumb_4"],
    									'default_name' => 'mainpage_photogal.jpg'
    									));
    								?>
    							</div>
  2. curlybracket
    Member
    Posted 3 years ago #

  3. Ryan Paco
    Member
    Posted 3 years ago #

    Thank you veganist

Topic Closed

This topic has been closed to new replies.

About this Topic