Hello,
I’m using WP show posts to display current ‘Projects’.
I would also like to show an archive of ‘Projects on the same page.
Is this how?
<div class="wpsp-project-posts grid-container">
<h2>Project Posts</h2>
<?php
if ( is_single() ) {
$cats = get_the_category();
$cat = $cats[0];
} else {
$cat = get_category( get_query_var( 'cat' ) );
}
$cat_slug = $cat->slug;
$list = get_page_by_title( 'projects', 'OBJECT', 'wp_show_posts' );
wpsp_display( $list->ID, 'tax_term="' . $cat_slug . '"' );
?>
</div>