exclude categories from portfolio
-
Hello!
I tried to exclude some portfolio categories, because I want to show two different portfolios (“advertisement” and “events”).I have searched for a long time and tried several things such as cat=-5 in query_posts(), but nothing worked.
Here is the code where I think it must be placed, but I’m not sure
(It’s the template “otw-prtfolio-filterable.php”)<div class="otw-twentyfour otw-columns"> <ul class="otw-portfolio block-grid three-up mobile"> <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; ?> <?php query_posts('post_type=otw-portfolio&posts_per_page=-1&paged='.$paged); ?> <?php if (have_posts()): while (have_posts()) : the_post(); ?> <li data-type="<?php foreach(get_the_terms($post->ID, 'otw-portfolio-category') as $term) echo $term->slug.' ' ?>" data-id="id-<?php echo($post->post_name) ?>">
Has anyone an idea how i could do that?
Thanks in advance!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘exclude categories from portfolio’ is closed to new replies.