WordPress.org

Ready to get started?Download WordPress

Forums

Smart Archives Reloaded
Exclude category and sticky post (1 post)

  1. sanjoyroy
    Member
    Posted 1 year ago #

    OK, I have 2 category archives going on my site (which is all on my local disk, not online yet). The first archive is called News, category id='1947', and I got SmartArchives to display only the news category fine with the following code:

    <?php
    $sar_args = array(
      'format' => 'block',
    );
    $query_args = array(
      'category__in' => '1947'
    );
    smart_archives( $sar_args, $query_args );
    ?>

    With my other archive - which is everything else - I want to exclude the News category '1947', and a single sticky post with id='5405'. So I tried this code, but it's not working (News and sticky post is still included in the smart archive):

    <?php
    $sar_args = array(
      'format' => 'block',
    );
    $query_args = array(
      'category__not_in' => '1947'
      'p' => '5405'
    );
    smart_archives( $sar_args, $query_args );
    ?>

    Any ideas what is wrong?

    http://wordpress.org/extend/plugins/smart-archives-reloaded/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags