Last active
November 1, 2017 02:40
-
-
Save kirasiris/af2bd4964a59f62f26ce3306a7bd6789 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Template Name: Portfolio | |
Template Post Type: page | |
*/ | |
?> | |
<?php get_header(); ?> | |
<div class="container"> | |
<!-- Page Heading --> | |
<div class="row"> | |
<div class="col-lg-12"> | |
<div class="pull-left"> | |
<button class="btn btn-sm btn-default" data-toggle="portfilter" data-target="all">All</button> | |
</div> | |
</div> | |
</div> | |
<br/> | |
<div class="row"> | |
<?php | |
$portfolio_query = new WP_Query(array( | |
'post_type' => 'portfolios', | |
'order' => 'DESC', | |
)); | |
?> | |
<?php if($portfolio_query->have_posts()) : while($portfolio_query->have_posts()) : $portfolio_query->the_post();?> | |
<div class="col-md-4" data-tag="all"> | |
<div class="thumbnail"> | |
<?php if(has_post_thumbnail()) : ?> | |
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('portfolio-page'); ?></a> | |
<?php endif; ?> | |
<div class="caption"> | |
<a href="<?php the_permalink(); ?>"><h4><?php the_title(); ?></h4></a> | |
</div> | |
</div> | |
</div> | |
<?php endwhile; ?> | |
<?php else : ?> | |
<div class="alert alert-danger text-center"><p>Ningun portfolio encontrado</p></div> | |
<?php endif; ?> | |
</div> | |
</div><!-- /Container --> | |
<?php get_footer(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment