File: /home/mirz4654/public_html/wp-content/themes/mira-yosomite/template-portfolio.php
<?php /* Template Name: Portfolio Template */ ?>
<?php
ini_set('memory_limit', '1256M');
get_header();
$paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
?>
<!-- ============ Content =============== -->
<main class="main-content">
<div class="page-container">
<div class="section hero-area h-full-screen" data-parallax="scroll" data-position="top" data-image-src="<?php echo myt_thumb(get_the_ID(), 'full'); ?>" data-natural-width="1400" data-natural-height="900">
<div class="overlay"></div>
<div class="pos-tb-center">
<div class="container">
<div class="row">
<div class="col-md-12">
<h2 class="t-center t-uppercase color-white font-50"><?php the_title(); ?></h2>
</div>
</div>
</div>
</div>
</div>
<div <?php post_class('section portfolio-area ptb-60'); ?> id="page-<?php the_ID(); ?>">
<div class="container">
<?php
// Start the loop.
while (have_posts()) : the_post();
/*
?>
<div class="row mb-40">
<div class="col-lg-8 col-md-10 col-sm-10 col-xs-12 col-xs-center t-center mb-40">
<h2 class="mb-20 font-24 t-uppercase"><?php echo (get_post_custom_values('page-tagline', get_the_ID()) != '') ? get_post_custom_values('page-tagline', get_the_ID())[0] : 'WHAT WE CAN DO'; ?></h2>
<div class="color-mid"><?php the_content(); ?></div>
</div>
</div>
<?php */ ?>
<div class="row row-tb-10 row-rl-10 porto-list" id="porto-list">
<?php
//$column = (is_int(count($children) / 3)) ? 'col-md-4' : 'col-md-6';
echo $category = (get_post_custom_values('portfolio-category', get_the_ID()) != '') ? get_post_custom_values('portfolio-category', get_the_ID())[0] : 'portfolio';
/* show recent portfolio ignoring featured position */
$args = array(
'paged' => $paged,
'category_name' => $category,
'post_type' => 'portfolios',
'post_status' => 'publish',
'posts_per_page' => get_option('posts_per_page'),
);
query_posts($args);
if (have_posts()) :
while (have_posts()) :
the_post();
?>
<div class="<?php //echo $column; ?> col-sm-6 porto">
<div class="work-inner">
<div class="work-overlay">
<h3 class="font-22"><?php the_title(); ?></h3>
<a href="<?php the_permalink(); ?>" class="work-link"><i class="fa fa-link"></i></a>
<a href="<?php echo myt_thumb(get_the_ID(), 'thumbnail'); ?>" class="img-lightbox"><i class="fa fa-search"></i></a>
</div>
<img src="<?php echo myt_thumb(get_the_ID(), 'thumbnail'); ?>" alt="">
</div>
</div>
<?php
endwhile;
endif;
?>
</div>
<div class="t-center pt-40">
<?php
wp_pagenavi();
wp_reset_query();
?>
</div>
<?php endwhile; ?>
</div>
</div>
</div>
</main>
<?php get_footer(); ?>