Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Template Name: Portfolio 2 Columns
- */
- ?>
- <?php get_header(); ?>
- <div id="main">
- <ul id="filters" class="option-set filter" data-option-key="filter">
- <li>Filter: </li>
- <?php $categories = get_categories('orderby=name&depth=1&title_li=&use_desc_for_title=1&parent=49'); foreach ($categories as $cat) { ?>
- <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>
- <?php } ?>
- <li><a href="#" data-option-value="*" id="showall" class="selected close-subnav filter-item">show all</a></li>
- </ul>
- <?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); } ?>
- <div class="port port-file <?php $post_cats = get_the_category(); foreach( $post_cats as $category ) { echo $category->slug.' ';} ?>" data-category="portfolio">
- <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> </div>
- <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); ?>">
- <?php the_post_thumbnail(); ?></a>
- </div>
- <?php $count++; endforeach; ?>
- </div>
- <!-- END post -->
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement