• I just added Nicer Archives to my site. But I want to filter a category from the outputted list. Any ideas what to add to the PHP to make that happen? I have those categories filtered from my dropdown list and from the index.
    Thanks!

Viewing 15 replies - 1 through 15 (of 18 total)
  • You might find some specific information at http://weblogtoolscollection.com/ . I’d be interested in finding this out as well, since I want to implement Nicer Archives as well. πŸ™‚

    Thread Starter davedorm

    (@davedorm)

    I am already using MooKitty’s plugin, and she was nice enough to write a hack for me to exclude multiple categories from my index and from my dropdown list. But I am having very little luck with the Nicer Archives. The version you have given me shows a whopping four posts and claims to be done. I have hundreds of posts dating back to 2002.
    My installation of Nicer Archives does work. It just shows the categories I want to exclude. I just need the required PHP to make that happen.

    Dave, did you adjust the $categorylist on line 44 of narchives_cats.php to reflect the categories that you want? It looks like it’s still set to “1”.

    Thread Starter davedorm

    (@davedorm)

    I just changed it. It now reads $categorylist = '-21'; which is the offending category I wish to exclude. Now, it is showing all the posts, but the sorting is wonky. Even when selected to sort by date, it is still segregating by category first, then by date within that set.
    Just can’t get it, burt, but let’s keep banging on it! πŸ™‚

    Dave, try the updated version of the narchives_cats.php at the same location as above. I made a couple of changes to the arguments passed to the ShowCategories plugin function and it seems to be sorting properly for each of the different options now. Let me know if it’s still not right.

    Thread Starter davedorm

    (@davedorm)

    Well, it’s better. But if I select just 2004, it still shows all posts from all years. Also, it is duplicating some of the posts on the list. Weird. Thanks for your continued assistance, Burt.

    Thread Starter davedorm

    (@davedorm)

    Upon further review, the posts that are duplicated appear to be members of multiple categories. So that’s why it’s duplicating, I guess.

    Dave, it looks like the ShowCategories plugin isn’t paying attention to the date limiting. I’ll have a play with it and see if I can get it going. And at some point, I’ll get these changes to MooKitty and see if she wants to merge them in.

    OK Dave, updated version of the hacked ShowCategories plugin at the same location as above. This one includes filtering on the $m value.

    Thread Starter davedorm

    (@davedorm)

    We’re getting there… date seems to be fine now.
    Now: DUPLICATE LISTINGS. If a post is in more than one category, it is showing multiple times in the categories listings. I have some posts that actually are listed in three categories, so it shows up three times in the listings.
    Any ideas on that?

    OK, try again.. New ShowCategories file..
    In the date and title listsings the post should only show once, but it will still show once in each category in the category lists. Is that what you want?

    Thread Starter davedorm

    (@davedorm)

    That did it. I only have one wish. I want to have the default view set to only display the most recent year and not all years. But it works well.

    hmm, the easiest way to do that right now is to change the links to the archives page to be:
    narchives_cats.php?m=<?php echo date('Y'); ?>
    I’ll have a look at the way the page works and see if there is an easy way to keep it self-contained.

    Can I get more installation instructions for the cat-widget. I can’t get it working with mookittys plugin I downloaded from her site.

    Anon, there’s not much to it. What problem are you running in to?
    I made a few changes to the show_category_posts() function in the ShowCategories plugin, to add category and date filtering. I also fixed what appeared to be a bug that surfaced if you were only excluding categories via the negated notation. That hacked version of MooKitty’s plugin is up at the same place that you found the cats-widgets plugin: http://www.qogo.com/wpplugins/
    I’ve been a little busy the past few days and haven’t yet forwarded my changes to MooKitty to see if she wants to integrate them.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Filter Categories in Nicer Archives’ is closed to new replies.