Show all posts in a portfolio category
-
Hi there,
I’m having problems with some php codes. The only thing I want is to show all posts from a specific portfolio category. But right now it’s only showing 10 posts (1 page). This is the code I’m using right now in ‘taxonomy-portfolio-category.php’.
<?php $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); $paged = (get_query_var('paged')) ? get_query_var('paged') : 0; query_posts( array( 'post_type' => 'portfolio', 'portfolio-category' => $term->slug, 'paged' => $paged, 'orderby' => 'menu_order', 'order' => 'ASC' ) ); if( have_posts() ) : while (have_posts() ): the_post(); $portfolio_terms = get_the_terms( get_the_ID(), 'portfolio-category' ); $portfolio_term = ''; if(is_array($portfolio_terms)){ foreach($portfolio_terms as $term){ $portfolio_term.= $term->slug.' '; } } ?>
What should I change to load all posts from a specific portfolio category.
Thank you in advance,
Nathan Lewis
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Show all posts in a portfolio category’ is closed to new replies.