Ondersteuning » Code oplossingen gezocht » excerpt en thumbnail ook op tag en categorie pagina weergeven

  • Opgelost dennissites

    (@dennissites)


    Beste wordpress experts

    Ik heb een vraag / probleem, zoals mijn wordpress site nu is toont deze alleen op de index pagina de thumbnail en de excerpt horend bij het bericht.

    Nu wil ik graag dat deze ook bij de berichten op de tag en op categorie pagina worden getoond!!

    Weet iemand hoe ik dit simpel voor elkaar kan krijgen ?

    <?php get_header(); ?>
    <div id="container">
    	<div id="main">
    
    		<?php if (is_home()){ ?>
    			<h1>Home title</h1>
    
                    <?php } elseif (is_tag()){ ?>
    			<h1>tag title</h1>
    
    		<?php } elseif (is_category()){ ?>
    			<h1>categorie title</h1>
    		<?php } ?>
    
        	<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    			<div class="post<?php if(function_exists (sticky_class)): sticky_class(); endif; ?>" id="post-<?php the_ID(); ?>">
    
    				<div class="title">
    
                                            <h2><a>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
    
    					<div class="postmeta">
    						<span class="lp">bla bla bla:</span> <span class="category"><?php the_category(', ') ?></span>  
    						<?php
    							$tag = get_the_tags();
    							if(!$tag){
    								echo "bla bla bla:";
    							}
    							else{
    						?>
    						<span class="lp">bla bla bla:</span> <?php the_tags('<span>',', ','</span>'); ?>
    						<?php } ?>
    						<?php edit_post_link('Edit', ' / ', ''); ?>
    
    					</div><!-- end postmeta -->
    				</div><!-- end title -->
    				<div class="clear"></div>
    
    				<?php if (!(is_tag()) && !(is_category())){ ?>
    
    				<div class="entry">	 
    
    <?php if ( has_post_thumbnail() ) {
    the_post_thumbnail(array(100,100), array('class' => 'alignleft', 'title' => ''.get_the_title().'' ));
    }
    
    echo apply_filters('the_excerpt', get_the_excerpt()); 
    
    ?>
    
    					<div class="clear"></div>
    				</div><!-- end entry -->
    
    				<?php } ?>
    			</div><!-- end post -->
    		<?php endwhile; ?>
    		<!-- navigation -->
        	<div class="navigation">
                    <?php if(!function_exists('wp_pagenavi')) : ?>
    				<div class="alignleft"><?php echo $next_page; ?></div>
    				<div class="alignright"><?php echo $prev_pages; ?></div>
    				<?php else : wp_pagenavi(); endif; ?>
        	</div><!-- end navigation -->
    
    	    <?php else : ?>
    	    	<div class="post">
    				<div class="title">
    					<h2>Sorry, nothing found!</h2>
    				</div>
    				<div class="clear"></div>
    				<div class="entry no_result">
    					<p class="no_result">Please use the search function, or visit the archives page.</p>
    				</div>
    			</div><!-- end post -->
    		<?php endif; ?>
    	</div><!-- end main -->
    <?php get_sidebar(); ?>
    <div class="clear"></div>
    </div><!-- end container -->
    <?php get_footer(); ?>

2 reacties aan het bekijken - 1 tot 2 (van in totaal 2)
2 reacties aan het bekijken - 1 tot 2 (van in totaal 2)
  • Het onderwerp ‘excerpt en thumbnail ook op tag en categorie pagina weergeven’ is gesloten voor nieuwe reacties.