WordPress.org

Support

Support » How-To and Troubleshooting » Exclude article from a category in "recent news"

Exclude article from a category in "recent news"

  • Hello,

    Here is my recent news code:

    <h5 class=”recentnews”>Derniers articles</h5>

    <ul >
    <?php

    /* Do not display stick posts */
    query_posts(array(‘showposts’ => get_option(‘gp_featured_articles’), ‘post__not_in’ => get_option(‘sticky_posts’), ‘caller_get_posts’ => 1, ‘category_id’ => 1)); ?>

    <?php while (have_posts()) : the_post(); ?>

  • <div class=”thumbnail-small”><?php the_post_thumbnail(); ?></div>
    <span class=”title”>” title=”<?php the_title(); ?>”><?php the_title(); ?></span>
    <span class=”meta”><?php the_time(‘l j F, Y’); ?></span>
  • <?php endwhile; ?>

    </div>
    <!– // Recent News –>

    I am trying to find a way to exclude all article from a categorie having n°=817 with no success…

    If someone could help…

    Thanks a lot

    Eric

  • The topic ‘Exclude article from a category in "recent news"’ is closed to new replies.
Skip to toolbar