php - Wordpress and Jetpack filterable portfolio -


so followed tutorial on how use wordpress, jetpack, , isotope make filterable portfolio of projects i've done. got filter , project images display tutorial says should. think works great.

my main issue right want display "recent websites" in footer , display name, image, , brief content. have done different way , worked creating custom post type.

<?php $args = array( 'post_type' => 'projects', 'category_name' => 'websites', 'posts_per_page' => 2 ); 

projects custom post type created since followed tutorial got in 1 basically. again im trying "2" of recent websites display @ footer of website , how did that.

<?php $args = array( 'post_type' => 'jetpack-portfolio', 'category_name' => 'websites', 'posts_per_page' => 2 ); 

when view website, nothing displays. did more research , found out "jetpack-portfolio" custom taxonomy , it's jetpack-portfolio-type i'm trying call , nothing work, or display 2 recent projects added site.

edit: tried placing pictures on here rep isn't high enough :p

so question is: how can call custom taxonomy again display websites only.

edit 7/16 @ 9:06pm et

<div class="cfoot"> <h2>recent websites</h2> <?php $args = array( 'post_type' => 'jetpack-portfolio', 'category_name' => 'websites', 'posts_per_page' => 2 ); $loop = new wp_query( $args ); while ( $loop->have_posts() ) : $loop->the_post(); { ?> <section id="recent-web"> <img src="<?php echo get_template_directory_uri(); ?>/img/foot_placeholder.png" width="75" height="75" align="left" /> <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3> <p><?php the_excerpt(); ?></p> </section> <?php } endwhile; wp_reset_query();?> </div>

edit 7/18

ok messing around more , decided change category_name category_slug , seems display 2 of recent projects. that's fine again i'm trying display websites category , not of them. here updated code. <?php $args = array( 'post_type' => 'jetpack-portfolio', 'category_slug' => 'websites', 'posts_per_page' => 2); can display slug websites , not recent projects.

if combine data sets jetpack portfolios create in database official wp_query reference, solution should be:

<?php   $args = array(             'post_type'      => 'jetpack-portfolio',             'tax_query'      => array(                                   array(                                     'taxonomy' => 'jetpack-portfolio-type',                                     'field'    => 'slug',                                     'terms'    => 'websites'                                   )                                 ),             'posts_per_page' => 2           );    $loop = new wp_query($args); ?> 

Comments