WordPress Portfolio showing all items but i want it to show as per the category

Hello i have one site http://anujtradingco.com/ i have created 2 pages with name rugs and bathmats and they have template as 3 col portfolio and but when eva i m clicking any of the both pages they showing whole portfolio i.e. it showing bathmats and rugs together in both pages.

mainly this line getting the post but i want to put a filter in it so kindly help me out and this is the line which getting the all post

query_posts("post_type=portfolio&paged=".get_query_var('paged'));

Related posts

Leave a Reply

1 comment

  1. You can pass category-id (cat=3) if using categories such as:

    query_posts("post_type=portfolio&cat=3&paged=".get_query_var('paged'));
    

    If there are custom taxonomies (for ex: taxonomies name is ‘actor’) the syntax would be such as:

    $args = array(
        'post_type'=> 'movie',
        'actor'    => 'Bruce Campbell, Chuck Norris',
        'order'    => 'ASC'
    );
    query_posts( $args );
    

    For more you can visit:
    http://codex.wordpress.org/Function_Reference/query_posts

    Although WP_Query is recommended approach instead of query_posts