WordPress.org

Ready to get started?Download WordPress

Forums

New Plugin: Explicit Category Sort (22 posts)

  1. pericat
    Member
    Posted 9 years ago #

    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.

  2. Marsroy
    Member
    Posted 9 years ago #

    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!

  3. pericat
    Member
    Posted 9 years ago #

    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.

  4. pericat
    Member
    Posted 9 years ago #

    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.

  5. pericat
    Member
    Posted 9 years ago #

    Now creates valid XHTML. (cough)

  6. dozer
    Member
    Posted 9 years ago #

    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......

  7. pericat
    Member
    Posted 9 years ago #

    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"

  8. dozer
    Member
    Posted 9 years ago #

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

  9. pericat
    Member
    Posted 9 years ago #

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

  10. pericat
    Member
    Posted 9 years ago #

    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

  11. Randyd
    Member
    Posted 9 years ago #

    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

  12. Randyd
    Member
    Posted 9 years ago #

    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'); ?>

  13. Torvon
    Member
    Posted 9 years ago #

    Great script, thank you very much !

  14. kickass
    Member
    Posted 9 years ago #

    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.

  15. vkaryl
    Member
    Posted 9 years ago #

    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!

  16. mahmoodreza
    Member
    Posted 8 years ago #

    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

  17. mahmoodreza
    Member
    Posted 8 years ago #

    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

  18. Sapphire
    Member
    Posted 8 years ago #

    When I activate the plugin, all my categories disappear from the front page. The list I'm using is:

    $mylist = "spare-no-expense,extravagant,simply-gorgeous,quite-posh,stunning,very-impressive,thinking-of-you,cheers-mate,who-are-you-again,champagne,wine,gourmet,chocolate,coffee,tea,elegant-berry-gifts,candy-and-snack,cookies-cakes-pastries,breakfast-and-dinner,healthy,sugar-free,bath-and-beauty,sports,gardening";

    I didn't touch anything else.

  19. Sapphire
    Member
    Posted 8 years ago #

    Never mind... I didn't have my permalinks set to something friendly. ;) Been one of those days.

  20. mahmoodreza
    Member
    Posted 8 years ago #

    i'm type my category sorted bu alpha in $mylist but they don't sort in my main page of site.
    are you think i must insert any tag in template of WP?
    my version of WP is 1.2.1 , are you think this plugin dont work on this version?

  21. mahmoodreza
    Member
    Posted 8 years ago #

    please answer to m question!!!!

  22. froman118
    Member
    Posted 8 years ago #


Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.