WordPress.org

Forums

Skitter Slideshow
[resolved] How to exclude category? (4 posts)

  1. kanabi
    Member
    Posted 3 years ago #

    I want to display images from all categories but one. Could anyone show me the specific line of code to make this modification?

    Thanks in advance,
    kanabi

    http://wordpress.org/extend/plugins/wp-skitter-slideshow/

  2. kanabi
    Member
    Posted 3 years ago #

    OK, I just did it.

    In file wp-skitter-slideshow.php:

    $query_posts = 'cat='.$category.'&posts_per_page='.$wp_skitter_slides;

    >

    $query_posts = 'cat='.$category.'&cat=-11&posts_per_page='.$wp_skitter_slides;

    Piece of cake. Hope to save some other ppls time.

  3. andonifer
    Member
    Posted 2 years ago #

    What if you wanted to exclude all categories but two of them? Would it be something like this?:

    $query_posts = 'cat='.$category.'&cat=-3,-4&posts_per_page='.$wp_skitter_slides;

  4. kanabi
    Member
    Posted 2 years ago #

    Yes, this is how it works for me now. However in previous versions (below 2.0) the working code would look like this:

    $query_posts = 'cat='.$category.'&cat=-3&cat=-4&posts_per_page='.$wp_skitter_slides;

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Skitter Slideshow
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic