Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php /* Template Name: Portfolio */ ?>
- <?php
- get_header();
- wp_reset_query();
- ?>
- <section id="content" role="main" class="main-content">
- <header style="background-image: url(<?php echo get_template_directory_uri()?>/assets/images/banner.jpg);">
- <div class="container text-center">
- <h1 class="page-title-container"><span class="page-title bold-impact text-uppercase">Portfolio</span></h1>
- </div>
- </header>
- <article>
- <div class="container">
- <div class="row">
- <?php
- $args = array( 'hide_empty=0' );
- $terms = get_terms( 'protfolio-cat', $args );
- if ( ! empty( $terms ) && ! is_wp_error( $terms ) ) {
- $count = count( $terms );
- $i = 0;
- $term_list = '<p class="my_term-archive">';
- foreach ( $terms as $term ) {
- $i++;
- $term_list .= '<a href="' . esc_url( get_term_link( $term ) ) . '" alt="' . esc_attr( sprintf( __( 'View all post filed under %s', 'my_localization_domain' ), $term->name ) ) . '">' . $term->name . '</a>';
- if ( $count != $i ) {
- $term_list .= ' · ';
- }
- else {
- $term_list .= '</p>';
- }
- }
- echo $term_list;
- }
- ?>
- <?php foreach(get_posts(array('posts_per_page'=>30,'category_name'=>'responsive','post_type'=>'portfolioo')) as $post) { setup_postdata($post); ?>
- <div class="col-sm-4 col-md-3 portfolio-item">
- <a href="<?php the_permalink()?>">
- <div class="portfolio-image-cat"><?php the_post_thumbnail('large')?></div></a>
- <footer class="portfolio-info">
- <div class="portfolio-name text-center">
- <?php the_title()?>
- </div>
- <div class="portfolio-links clearfix text-center">
- <a href="<?php the_permalink()?>" class="portfolio-link-design">View Design ></a>
- <a href="<?php echo esc_url( get_post_meta( get_the_ID(), 'wpcf-url', true ) ); ?>" class="portfolio-link-website" target="_blank">View Site ></a>
- </div>
- </footer>
- </div>
- <?php } ?>
- </div>
- <h2>JS Applications</h2>
- <div class="row">
- <?php foreach(get_posts(array('posts_per_page'=>30,'category_name'=>'js','post_type'=>'portfolioo')) as $post) { setup_postdata($post); ?>
- <div class="col-sm-4 col-md-3 portfolio-item">
- <div class="portfolio-image-cat"><?php the_post_thumbnail('large')?></div></a>
- <footer class="portfolio-info">
- <div class="portfolio-name text-center">
- <?php the_title()?>
- </div>
- <div class="portfolio-links clearfix text-center">
- <a href="<?php the_permalink()?>" class="portfolio-link-design">View Design ></a>
- <a href="<?php echo esc_url( get_post_meta( get_the_ID(), 'wpcf-url', true ) ); ?>" class="portfolio-link-website" target="_blank">View Site ></a>
- </div>
- </footer>
- </div>
- <?php } ?>
- </div>
- </div>
- </article>
- </section>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement