Podrška » Teme i predlošci » WP attachemnt

  • Pozdrav ekipa 🙂

    Trebam mali help… naime u templatu mi prikazuje na indexu samo jednu sliku (po defoltu sadanu) a ja hoću da prikazuje thumb slikicu od tog posta…

    <?php if (!have_posts()) : ?>
    
    <div id="post-0" class="post error404 not-found">
    	<h1 class="title">Not Found</h1>
    	<div class="content">
    		<p>Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.</p>
    	</div>
    </div>
    
    <?php else : ?>
    
    	<?php add_filter('excerpt_length', 'padd_theme_hook_excerpt_index_length'); ?>
    	<?php while (have_posts()) : ?>
    		<?php the_post(); ?>
    		<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    			<div class="title append-clear">
    				<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
    				<p><abbr title="<?php the_time('F j, Y'); ?>"><?php the_time('m-d-Y'); ?></abbr></p>
    			</div>
    			<div class="thumbnail">
    				<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
    					<?php
    						$padd_image_def = get_template_directory_uri() . '/images/thumbnail.jpg';
    						if (has_post_thumbnail()) {
    							the_post_thumbnail();
    						} else {
    							echo '<img class="thumbnail" alt="Default thumbnail." src="' . $padd_image_def . '" />';
    						}
    					?>
    				</a>
    			</div>
    			<?php the_excerpt();?>
    			<p class="read-more"><a href="<?php the_permalink(); ?>" title="Permanent Link to <?php the_title_attribute(); ?>">Opširnije</a></p>
    		</div>
    	<?php endwhile; ?>
    	<?php remove_filter('excerpt_length', 'padd_theme_hook_excerpt_index_length'); ?>
    
    	<?php Padd_PageNavigation::render(); ?>
    
    <?php endif; ?>
  • Tema ‘WP attachemnt’ je zaključana zbog novih odgovora.