<?php
/*
* Template Name: Recent Work Template
*/
get_header(); ?>
<?php while ( have_posts() ) : the_post(); ?>
<div id="contentWrapper" class="contentTop recentWork">
<div class="page-title title-1"><?php echo the_post_thumbnail();?></div>
<div class="sectionWrapper">
<div class="container">
<div id="portfolioGallery-filter" class="portfolio-filterable">
<div class="row">
<div class="gry-bg"> <span class="left filter-by"></span>
<ul id="filters">
<?php
$orderby = 'name';
$taxonomy = 'recent_works_category'; //slug name
$args = array(
'orderby' => $orderby,
'taxonomy' => $taxonomy,
'category__in' => array($category->term_id),
'hide_empty'=> 0,
'exclude'=>1,
);
?>
<?php
$m=1;
$postid=$_REQUEST['pid'];
$queried_post = get_post($postid);
$title = $queried_post->post_title;
$content= $queried_post->post_content;
$image_path = wp_get_attachment_url(get_post_thumbnail_id($postid));
$categories = get_categories($args);
foreach ($categories as $category)
{
?>
<li class=""><a href="javascript:void(0)" class="filter" data-filter="<?php echo $category->slug; ?>"><?php echo $category->cat_name; ?></a></li>
<?php } ?>
<li class="active"><a href="#" class="filter" data-filter="*">Show All</a></li>
</ul>
</div>
<div class="portfolio-items">
<?php
$orderby = 'name';
$taxonomy = 'recent_works_category'; //slug name
$args = array(
'orderby' => $orderby,
'taxonomy' => $taxonomy,
'category__in' => array($category->term_id),
'hide_empty'=> 0,
);
?>
<?php
$m=1;
$postid=$_REQUEST['pid'];
$queried_post = get_post($postid);
$title = $queried_post->post_title;
$content= $queried_post->post_content;
$image_path = wp_get_attachment_url(get_post_thumbnail_id($postid));
$categories = get_categories($args);
foreach ($categories as $category)
{
?>
<?php
$loop = new WP_Query( array('post_type' => 'recent_works',
'recent_works_category'=>$category->slug ) );
while ( $loop->have_posts() ) : $loop->the_post();
$postid = get_the_ID();
$thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'thumbnail_size' );
$url = $thumb['0'];
?>
<div class="cell-3 " data-filter="<?php echo $category->slug; ?>" data-animate="fadeInUp" style="">
<div class="portfolio-item">
<div class="one_bg_selct_bottom">
<div class="bg_chanege_image_overlay"> <a href="<?php echo $url; ?>" class="fx zoom undefined animated fadeInDown" title="<?php the_title();?>" data-gal="prettyPhoto[gallery1]"><b class="fa fa-search-plus"></b>
<?php the_post_thumbnail();?>
</a>
</div>
</div>
</div>
</div>
<?php endwhile;?>
<?php } ?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php endwhile;?>
<?php get_footer(); ?>
/*
* Template Name: Recent Work Template
*/
get_header(); ?>
<?php while ( have_posts() ) : the_post(); ?>
<div id="contentWrapper" class="contentTop recentWork">
<div class="page-title title-1"><?php echo the_post_thumbnail();?></div>
<div class="sectionWrapper">
<div class="container">
<div id="portfolioGallery-filter" class="portfolio-filterable">
<div class="row">
<div class="gry-bg"> <span class="left filter-by"></span>
<ul id="filters">
<?php
$orderby = 'name';
$taxonomy = 'recent_works_category'; //slug name
$args = array(
'orderby' => $orderby,
'taxonomy' => $taxonomy,
'category__in' => array($category->term_id),
'hide_empty'=> 0,
'exclude'=>1,
);
?>
<?php
$m=1;
$postid=$_REQUEST['pid'];
$queried_post = get_post($postid);
$title = $queried_post->post_title;
$content= $queried_post->post_content;
$image_path = wp_get_attachment_url(get_post_thumbnail_id($postid));
$categories = get_categories($args);
foreach ($categories as $category)
{
?>
<li class=""><a href="javascript:void(0)" class="filter" data-filter="<?php echo $category->slug; ?>"><?php echo $category->cat_name; ?></a></li>
<?php } ?>
<li class="active"><a href="#" class="filter" data-filter="*">Show All</a></li>
</ul>
</div>
<div class="portfolio-items">
<?php
$orderby = 'name';
$taxonomy = 'recent_works_category'; //slug name
$args = array(
'orderby' => $orderby,
'taxonomy' => $taxonomy,
'category__in' => array($category->term_id),
'hide_empty'=> 0,
);
?>
<?php
$m=1;
$postid=$_REQUEST['pid'];
$queried_post = get_post($postid);
$title = $queried_post->post_title;
$content= $queried_post->post_content;
$image_path = wp_get_attachment_url(get_post_thumbnail_id($postid));
$categories = get_categories($args);
foreach ($categories as $category)
{
?>
<?php
$loop = new WP_Query( array('post_type' => 'recent_works',
'recent_works_category'=>$category->slug ) );
while ( $loop->have_posts() ) : $loop->the_post();
$postid = get_the_ID();
$thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'thumbnail_size' );
$url = $thumb['0'];
?>
<div class="cell-3 " data-filter="<?php echo $category->slug; ?>" data-animate="fadeInUp" style="">
<div class="portfolio-item">
<div class="one_bg_selct_bottom">
<div class="bg_chanege_image_overlay"> <a href="<?php echo $url; ?>" class="fx zoom undefined animated fadeInDown" title="<?php the_title();?>" data-gal="prettyPhoto[gallery1]"><b class="fa fa-search-plus"></b>
<?php the_post_thumbnail();?>
</a>
</div>
</div>
</div>
</div>
<?php endwhile;?>
<?php } ?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php endwhile;?>
<?php get_footer(); ?>
No comments:
Post a Comment