Advertisement
Guest User

Untitled

a guest
May 24th, 2012
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 KB | None | 0 0
  1. <?php
  2. /*
  3. Template Name: Portfolio 2 Columns
  4. */
  5. ?>
  6. <?php get_header(); ?>
  7.  
  8. <div id="main">
  9.  
  10. <ul id="filters" class="option-set filter" data-option-key="filter">
  11. <li>Filter: </li>
  12. <?php $categories = get_categories('orderby=name&depth=1&title_li=&use_desc_for_title=1&parent=49'); foreach ($categories as $cat) { ?>
  13. <li><a href="#"<?php if ($cat->slug == 'photos') {?> class="show-subnav filter-item" <?php } else {?>class="close-subnav filter-item" <?php }?>id="<?php echo $cat->slug; ?>" data-option-value=".<?php echo $cat->slug; ?>"><?= $cat->cat_name; ?></a></li>
  14. <?php } ?>
  15. <li><a href="#" data-option-value="*" id="showall" class="selected close-subnav filter-item">show all</a></li>
  16. </ul>
  17.  
  18. <?php global $post; $count='';$args = array( 'numberposts' => 100, 'orderby' => 'rand', 'category' => 82 ); $myposts = get_posts( $args );foreach( $myposts as $post ) : setup_postdata($post); if (is_category()) {$yourcat = get_category ($cat); } ?>
  19.  
  20. <div class="port port-file <?php $post_cats = get_the_category(); foreach( $post_cats as $category ) { echo $category->slug.' ';} ?>" data-category="portfolio">
  21.  
  22. <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> </div>
  23. <a class="portfolio-img port-item-link showall <?php $post_cats = get_the_category(); foreach( $post_cats as $category ) { echo $category->slug.' ';} ?>" rel="portfolio" title="<?php the_content(); ?>" id="<?php echo get_post_meta($post->ID, 'trigger_id', true); ?>" href="<?php echo get_post_meta($post->ID, 'port_lg', true); ?>">
  24. <?php the_post_thumbnail(); ?></a>
  25. </div>
  26.  
  27. <?php $count++; endforeach; ?>
  28.  
  29. </div>
  30.  
  31.  
  32. <!-- END post -->
  33.  
  34. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement