WordPress.org

Support

Support » Plugins and Hacks » New Plugin: Explicit Category Sort

New Plugin: Explicit Category Sort

  • In response to this thread:

    http://wordpress.org/support/topic.php?id=23855

    Explicit Category Sort sorts category list in sidebar according to user-defined list. Ex: $mylist = "news,sports,trips,ship modelling".

    Download here. Drop in plugins folder. Change $mylist to suit yourself; bearing in mind that the category items must be separated by commas, and since they can contain spaces, don’t put any extra spaces in the list.

Viewing 15 replies - 1 through 15 (of 21 total)
  • Your plugin works good with my blog, thanks a lot, pericat! However, when actived, it hides all sub-categoriesas… 🙁 Is this what you have mentioned in the Known Issues?
    I used to set ‘hierarchical’ to TURE in the tag ‘list_cats’. Does your plugin ignore (or modify, maybe ) this parameter?
    Would u pls tell me how to fix this little problem? TKS!

    Yup, that’s it. It’s not designed to handle hierarchical *display*, though it will list out all the categories you tell it to, in whatever order you write them down.

    Hierarchical display involves capturing first, the condition of a category’s being a child, and then, if the list is to be displayed as a list, including the extra <ul>‘s and <li>‘s and so forth. And then there’s the situation where it’s a child of a child…

    So I just gave all that a miss for this go-round. I’ll make a note to look into it.

    I’ve revised the plugin to handle hierarchical displays, and made a few other changes to avoid problems when the user has, for instance, a category named “News” and another named something like “WordPress News”.

    Instructions, notes, etc. written up in comments. Please let me know if this suits.

    Now creates valid XHTML. (cough)

    I do love this plugin. Works as advertised. However there is one case which it would be nice if it handled — which is more than two levels of categories, ie A1,B1,C1,B2,C2. Since after C1 I want to go back up one level but not yet TOP, I don’t think I can do this……

    You should be able to. The ‘child’ designation has nothing to do with how you’ve built your categories in the admin panel. It’s purely a display thing. Put a ‘BACKUP’ between C1 and B2 and B2 will be at the next level above C1.

    That may not make sense… If you want:
    A1
      B1
        C1
      B2

    You would set $mylist so:
    “A1,CHILD,B1,CHILD,C1,BACKUP,B2”

    Thanks….. didn’t see the BACKUP designator. Again a very handy plugin.

    I’m glad to hear it’s working out for you. Let me know if you have any problems.

    Due to another issue pointed out by dozer (thanks!) regarding handling punctuation within category names, I’ve made several changes to the code.

    New version (1.3) download here:

    http://pericat.ca/downloads/perisort.tar.gz

    I’m using drop down categories exclude by typedby.com and would like to be able to sort the categories the way I want rather than a ascending or descending order.

    Any one have any suggestions?
    Thanks

    Randyd

    Found it. In the dropdown_cats_exclude.php plugin file you can see all the various functions. One is sorting order. Default is by name. You can change it to ID by using the sort_column=”ID”

    Example:
    <?php dropdown_cats_exclude('sort_column=ID&exclude=4,5'); ?>

    Great script, thank you very much !

    Um, it seems my unzipper doesn’t handle tar.gz very well (make that at all . . .) Can you post the code and instructions on a webpage or in a txt file I can copy/paste from? Or in a regular zip archive? This is exactly the function I’ve been looking for, and I can’t wait to set it up.

    kickass, you can download a trial version of winrar which will handle anything pretty much at RARLab. Way better than whatever’s in second place!

    hi
    i’m using this plugins and copy it in “wp-content/plugins” an actived and insert all of category in that same as Readme file:
    $mylist = “Iranian Music,,MP3,CHILD,Avril Lavigne,Sting,TOP,OGG,WMA”;

    but it’s not work and my category list in index.php page display:
    MP3
    Avril Lavigne
    Sting
    WMA
    OGG
    Iranian Music

    please help me for solv problem

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘New Plugin: Explicit Category Sort’ is closed to new replies.
Skip to toolbar