Last active
October 18, 2015 13:26
-
-
Save drjonnicholson/762a0e49c481a68bca83 to your computer and use it in GitHub Desktop.
A bit of code I use in my child theme (of the Spacious theme) to present my portfolio projects. Rather than doing this on a page I created a page template with this code that loops through all project types and displays the respective projects.
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 foreach ( get_terms( Jetpack_Portfolio::CUSTOM_TAXONOMY_TYPE, array( 'orderby' => 'id', 'order' => 'ASC' ) ) as $t ) { ?> | |
<section class="portfolio_section"> | |
<h2><?php echo $t->name; ?></h2> | |
<p><?php echo $t->description; ?></p> | |
<?php | |
echo Jetpack_Portfolio::portfolio_shortcode(array( | |
'display_types' => false, | |
'display_tags' => true, | |
'display_content' => true, | |
'show_filter' => true, | |
'include_type' => $t->slug, | |
'include_tag' => false, | |
'columns' => 3, | |
'showposts' => -1, | |
'order' => 'DESC', | |
'orderby' => 'tit' | |
)); | |
?> | |
</section> | |
<?php } ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment