• I have created links at the top of my archive template, to all of the posts on that archive page (they are category archives). This works fine unless a post is listed in multiple categories – in that case, all the links from both categories are listed at the top of the page. Is there a way to eliminate postings from a specific category in the following code?
    (code)`<?php
    foreach( ( get_the_category() ) as $category ) {
    $the_query = new WP_Query(‘category_name=’ . $category->category_nicename . ‘&showposts=5&offset=1’ );
    while ($the_query->have_posts()) : $the_query->the_post();
    ?>

Viewing 1 replies (of 1 total)
  • Thread Starter kwesthues

    (@kwesthues)

    I think a bit of the code was left out, the

    • part, but I think you can still see what I’m trying to do –

Viewing 1 replies (of 1 total)
  • The topic ‘How do I eliminate posts from a specific category in this list of posts?’ is closed to new replies.