Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="tabCat">
- <!-- DISPLAY ALL KNOWLEDGE BASE POSTS, GROUP BY SECTION TAXONOMY -->
- <?php
- $categories = get_terms('section', 'orderby=name&order=DESC&hide_empty=1&exclude=60,59');
- foreach( $categories as $category ):
- ?>
- <h3 class="kb-cat-title"><?php echo $category->name; // Prints the cat/taxonomy group title ?></h3>
- <div class="kb-single-border"></div>
- <?php
- $posts = get_posts(array(
- 'post_type' => 'knowledgebase',
- 'showposts' => 5,
- 'taxonomy' => $category->taxonomy,
- 'term' => $category->slug,
- 'perm' => 'readable'
- ));
- $count = 0;
- foreach($posts as $post): ?>
- <?php setup_postdata($post); //enables the_title(), the_content(), etc. without specifying a post ID
- if ($count == 0) { ?>
- <div class="kb-home-big">
- <?php if (has_post_thumbnail() ) {
- the_post_thumbnail('kb-home-thumb', array('class' => 'kb-home-thumb-small kb-big kbImgFix'));
- }?>
- <h2 class="kb-home-list-rt-title"><a href="<?php the_permalink();?>"><?php the_title();?></a></h2>
- <span class="theExcerpt"><?php echo excerpt(25);?>... <br/>
- <a class="link" href="<?php the_permalink();?>">Read More</a>
- </span>
- </div>
- <?php } else { ?>
- <div class="kb-home-list">
- <h2 class="kb-home-list-title"><a href="<?php the_permalink();?>"><?php the_title();?></a></h2>
- </div>
- <?php } ?>
- <?php $count ++; endforeach; ?>
- <div class="clear"></div>
- <?php endforeach; ?>
- </div>
- <div id="tabRecent">
- <!-- DISPLAY ALL KNOWLEDGE BASE POSTS, BY DATE OFFSET FIRST 7 DISPLAYED IN MULTI-COLUMN LAYOUT -->
- <ul class="post-list">
- <?php query_posts('post_type=knowledgebase&posts_per_page=10&offset=7&orderby=date&perm=readable'); ?>
- <?php while (have_posts()) : the_post(); ?>
- <li>
- <div class="post-list-item" style="">
- <?php if (has_post_thumbnail() ) {
- the_post_thumbnail('kb-home-thumb', array('class' => 'kb-home-thumb-small'));
- }?>
- <span class="theDate paddingCorr">
- <?php the_time('F j, Y');?>
- </span>
- <div class="details">
- <?php echo my_get_the_term_list( $post->ID, 'section', '', ', ', '', array(60) ); ?>
- </div>
- <h2 class="kb-home-list-title-noborder"><a href="<?php the_permalink();?>"><?php the_title();?></a></h2>
- <div class="theExcerpt">
- <?php echo excerpt(25);?>...
- </div>
- <a class="link" href="<?php the_permalink();?>">Read More</a>
- </div>
- </li>
- <?php endwhile;?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement