Title: Selected Categories
Last modified: August 19, 2016

---

# Selected Categories

 *  [noski2009](https://wordpress.org/support/users/noski2009/)
 * (@noski2009)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/selected-categories/)
 * 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)

 *  Thread Starter [noski2009](https://wordpress.org/support/users/noski2009/)
 * (@noski2009)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/selected-categories/#post-1762716)
 * [http://bit.ly/byqDtW](http://bit.ly/byqDtW)

Viewing 1 replies (of 1 total)

The topic ‘Selected Categories’ is closed to new replies.

## Tags

 * [categories](https://wordpress.org/support/topic-tag/categories/)
 * [query_posts](https://wordpress.org/support/topic-tag/query_posts/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [noski2009](https://wordpress.org/support/users/noski2009/)
 * Last activity: [15 years, 6 months ago](https://wordpress.org/support/topic/selected-categories/#post-1762716)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
