• I have a gallery page that shows various posts from different categories, all the categories are listed as links at the top of the page. What I can’t figure out is how to get WP to display the categories that are chosen by the user? So at this moment if the user clicks on say web design it displays web design and all the other categories posts instead of just the web design posts.

    I think it might be solved with query_posts but I’m not sure how, any ideas most welcome?

    This is the code I’m using on the main portfolio page.

    <?php wp_list_categories('taxonomy=services_rendered'); ?>
    
    <?php
       $loop = new WP_Query(array('post_type' => 'portfolio', 'posts_per_page' => 10));
    ?>
    <?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
    
    	<div class="portfolio-item">
         <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
    
         <div class="thumbnail">
    	<?php the_post_thumbnail(); ?>
         </div>
    
         <div class="excerpt">
    	<?php the_excerpt(); ?>
         </div>
    
    <?php endwhile; ?>

    Thanks

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Selected Categories’ is closed to new replies.