Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php $date = '';
- if( have_posts() ) : while( have_posts() ) : the_post();
- if( $date != get_the_date() ) {
- $date = get_the_date(); ?>
- <h3 class="news-date">Nieuws van <?php echo get_the_date('l j F Y'); ?></h3>
- <?php } ?>
- <span class="post-category">
- <?php foreach( get_the_category() as $cat ) {
- if( in_array($cat->name,array('WII U','3DS','DS','WII')) ) echo '<a href="' . get_category_link($cat->term_id) . '">' . $cat->name . '</a> '; //to restrict only to console categories - add all names into array - case sensitive
- } ?>
- </span>
- <span class="post-title">
- <a href="<?php the_permalink(); ?>" title="link to full post <?php the_title_attribute(); ?>"><?php the_title(); ?></a>
- </span>
- <br/>
- <?php endwhile;
- else: echo 'no posts';
- endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement