Zelig Planet

E' sempre più lungo arrivare che tornare indietro. (Murphy)

Home Page - Blog - Informazioni

Archivio

cerca un articolo inserendo una o più parole qui sotto:

oppure seleziona un mese dall'elenco:

oppure scegli una categoria di articoli:

oppure visualizza la pagina dell'archivio

Misc

Feed RSS 0.92 Feed RSS 2.0 RSS 2.0 comm. Feed Atom 0.3 XHTML valido CSS valido Sottoscrivi con Bloglines

Powered by
WordPress 2.0.7

Wordpress plugin: Zelig Dropdown Cats

Lunedì 23 Gennaio 2006 by Zelig

english italian Articolo multilingue / Multilanguage post

This plugin displays the categories in the sidebar as a simple dropdown list (select box). Unlike the WP built-in dropdown_cats function, it gives the option to exclude some categories from the list.

I don’t know if there is already a similar plugin or if there is another way to do something like this, but it was funny to make and that’s enough for me!

INSTRUCTIONS:

  1. Download the zip file (current version is 1.4 of october 12, 2006).
  2. Extract the zelig-dropdown-cats.php file into the plugins directory in your WordPress installation (wp-content/plugins).
  3. Log in to WordPress administration. Go to the Plugins page and Activate this plugin.
  4. Put this code somewere in your template page, outside the loop (usually in sidebar):
<?php zelig_dropdown_cats(); ?>

IMPORTANT: if you are updating the plugin from version 1.0 or 1.1, please remove all the code formerly required at this point and leave only the function call, as indicated above.

The zelig_dropdown_cats() function has some parameters you can pass:

Parameter Values Description Default
sort_column name
id
sort list by name or id number id
sort_order asc
desc
sorting direction of the list (ascending or descending) asc
file string name of the php file used to display selected categories (NOT WORKING!) index.php
hide_empty 0
1
1 means hide empty categories, 0 shows them too 1
exclude number or comma separated list of numbers these are the categories (ID numbers) to exclude from the list  
post_count 0
1
if set to 1, display the count of posts in each category 0
title string text appearing in the list box when it’s closed. If you don’t want the first row as a title, use this parameter without any value (’title=’) “Categories” (or corresponding localized text)
boxwidth number width size (in pixel) of the list box. If you don’t use this parameter or if you set it to 0, the list box will assume the width of the longest category name it contains. If you set a width value, longer names may be truncated at that point, depending on browser (IE6…) 0
child_of number If not set or if set to -1, shows all categories and subcategories. If set to 0, shows only main categories excluding all subcategories. If set with a category ID number, shows only its subcategories. -1

EXAMPLES:

<?php zelig_dropdown_cats('sort_column=name'); ?>

displays list sorted by name.

<?php zelig_dropdown_cats('sort_column=name&exclude=1,3,5,6'); ?>

displays list sorted by name, excluding categories id 1, 3, 5 and 6.

<?php zelig_dropdown_cats('sort_order=desc&hide_empty=0'); ?>

displays list in descending ID order, showing also empty categories.

<?php zelig_dropdown_cats('title=Select category&boxwidth=120'); ?>

shows “Select category” as a title in the list box and set the width to 120 pixels.

<?php zelig_dropdown_cats('title=&post_count=1&child_of=0'); ?>

don’t shows the first row with the title, adds the post count for every category and lists only main categories excluding subcategories.

NOTES:

The output code is valid XHTML Strict.
Tested with WordPress 1.5.2 and 2.0.x.

CHANGE LOG:

  • Version 1.4 (october 12, 2006): added “child_of” option to exclude the visualization of all subcategories or to show only subcategories of a given category. Another little upgrade lets you use more than one istance of the function in the same page.
  • Version 1.3 (august 26, 2006): now you can exclude the first row of the list with the title. Added localization support (translation of “Categories”, if available) as a default title.
  • Version 1.2 (august 14, 2006): semplified the code to put in the sidebar and added two new options “title” and “boxwidth”.
  • Version 1.1 (june 7, 2006): added “post_count” option to display a count of posts in each category after the name.

Look here for all the Wordpress plugins from Zelig!

Ci sono 121 commenti a questo articolo

  1. Gravatar Commento di Situation   (7 commenti)

    Grazieeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee

  2. Gravatar Commento di Zelig   (466 commenti)

    Pregooooooo :ciao:

  3. Gravatar Commento di Frick   (4 commenti)

    Grande Zelig … grandissimo !

  4. Gravatar Commento di Situation   (7 commenti)

    ehilà….rieccomi qui: chissà se questo plugin funziona con wordpress 2.0.1?!?

  5. Gravatar Commento di Zelig   (466 commenti)

    Già, chissà…
    Aspetto qualcuno che faccia una prova! :cheesygrin:

  6. Gravatar Commento di Situation   (7 commenti)

    guarda….se vuoi sono disposto a fare da cavia, visto che ho intenzione di aggiornare wordpress…a patto che tu ti impegni a risolvere eventuali problemi :cheesygrin:

    devo solo aspettare un paio di risposte da parte di un paio di sviluppatori di plugin, e poi procederò con l’upgrade….incrociando le dita

  7. Gravatar Commento di Zelig   (466 commenti)

    Io mi impegnerei anche, ma per poter risolvere eventuali problemi dovrei aggiornare anch’io a WP 2, e la cosa non è prevista a brevissimo termine..

  8. Gravatar Commento di Situation   (7 commenti)

    ottime notizie!!!

    ho eseguito l’upgrade (tra l’altro è una cazzata, ci vogliono 15 minuti e te lo consiglio)….e il tuo plugin funziona correttamente :thumbup:

  9. Gravatar Commento di Zelig   (466 commenti)

    Grazie per il test! :wink:

  10. Gravatar Commento di Chikatze   (7 commenti)

    Hi! Thank you so much for that plugin! :-) Do you have such for the archieves as well??? or how can i do? :food:

  11. Gravatar Commento di Zelig   (466 commenti)

    Thanks, Chikatze. Exactly, what do you need to do with archives? Just show them as a dropdown list or something else?

  12. Gravatar Commento di svalvolina   (1 commento)

    si che va!

  13. Gravatar Commento di Orlando   (1 commento)

    Thank you!

  14. Gravatar Commento di Joe   (1 commento)

    I love this plugin. Is there a way to apply it to the link categories as well?

  15. Gravatar Commento di Zelig   (466 commenti)

    Joe, if you want to display every link category as a dropdown list with its links inside, I think it’s possible, yes. But I have to work on it a little… :grin:

  16. Gravatar Commento di Arne   (1 commento)

    this plugin is great.
    thank you for the time you spent makin’ us happy ^^
    greetz from germany

  17. Gravatar Commento di jayne d'Arcy   (2 commenti)

    Zelig, I love you! I have been searching for this for ages. It was straightforward to install and use. My only wish for a future version would be for the list to show the number of posts in each category.

    Thank you very much!

  18. Gravatar Commento di LEMONed   (1 commento)

    it’s a really cool plugin. gotta check it out. thank you for ur work! :rotfl:

  19. Gravatar Commento di Zelig   (466 commenti)

    OK, Jayne.
    You got it! :wink:

  20. Gravatar Commento di aka   (2 commenti)

    What a cool plugin!
    I use it at my blog(written in Japanese) and it works well :thumbup:
    I think many Japanese WordPress users love it. But many Japanese hard to read English, so I wanna translate [ENGLISH] - Plugin description section into Japanese for them. May I do it?

  21. Gravatar Commento di Chikatze   (7 commenti)

    @Zelig:
    No, only as a dropdown. :-) :think:

  22. Gravatar Commento di Zelig   (466 commenti)

    Of course you can, aka!

  23. Gravatar Commento di Zelig   (466 commenti)

    Ok, Chikatze. If you just want a dropdown list with archive’s months (as you can see here in my blog), you don’t need a plugin at all. Just edit your sidebar.php and substitute the default code (should be something like this):


    <ul>
    <?php wp_get_archives('type=monthly'); ?>
    </ul>

    with this one (just copy & paste):


    <form id="archiveform" action="">
    <p><select name="archive_chrono" onchange="window.location=(document.forms.archiveform.archive_chrono[document.forms.archiveform.archive_chrono.selectedIndex].value);">
    <option value=''>Select month</option>
    <?php wp_get_archives('type=monthly&format=option'); ?>
    </select></p>
    </form>
  24. Gravatar Commento di Chikatze   (7 commenti)

    Thank you.
    But, sorry, it didn’t work. :-(
    What did I wrong?
    Might you take a look at my weblog? (German Part)

  25. Gravatar Commento di aka   (2 commenti)

    Thanx Zelig. I’ve done it. If you wanna read my translation, access here:
    http://plasticdreams.org/archives/2006/06/10/1237/zelig-dropdown-cats/

  26. Gravatar Commento di Chikatze   (7 commenti)

    Please help me!! (T-T) What did I do wrong???

  27. Gravatar Commento di Zelig   (466 commenti)

    Chikatze, you inserted an “escaped” code in your page. Maybe it depends on the editor you use. Try this: first copy the code above and paste it in Notepad, then copy this “clean” code and paste it in your sidebar.php file.

    @Aka: your site gives me a 403 error…

  28. Gravatar Commento di Chikatze   (7 commenti)

    Now it works! :-)
    Thank you sooooo much! :love: :thumbup:

  29. Gravatar Commento di medon   (1 commento)

    help me.. can you help me to made dropdown links on wordpress? i wait your information at my mail,

    thanks befor.

  30. Gravatar Commento di Dana   (9 commenti)

    Hi!

    This is a really great plugin, but I am having trouble configuring it to fit my layout. I have a two-column sidebar and when I put the code into the sidebar template, the dropdown menu either shows up at the top or the bottom of the other widgets (depending where I put the code). If it’s at the top, it is higher than the other column. I would like the tops of the two columns to be aligned. Could the output of the code be in a widget? This would line everything up nicely.

    Also, I have two groups of categories. Is it possible to have one dropdown list for one group of categories and another dropdown list for the other group of categories?

    Thanks!

  31. Gravatar Commento di Zelig   (466 commenti)

    Sorry Dana, but I don’t use widgets (and, to be honest, I also don’t know how they work…), so I’ve never tested the plugin with them and I can’t help you with your first question. :(
    About the second one, you can do it working on exclusions (”exclude” option): you add a first list excluding a group of categories, and a second one excluding the rest of them.

  32. Gravatar Commento di Dana   (9 commenti)

    Thanks! I appreciate your getting back to me!

  33. Gravatar Commento di Dana   (9 commenti)

    Hi, I am back with a new request. I have a lot of categories to exclude and I make new categories all the time. Is it possible to make an option for the opposite of “exclude” - like “include”? If not, is it possible to make an option for “exclude” to have ranges (instead of 1,2,3,4,5 use 1-5)?

    Thanks!

  34. Gravatar Commento di Zelig   (466 commenti)

    I must admit, Dana, that there’s already an option opposite of “exclude”… It’s the option “categories”, and it’s the same one also present in the WP standard function wp_list_cats, to be used with the same syntax: categories=array(categoryID,categoryID,categoryID…). The reason why the option is not documented in my plugin is simply because it doesn’t work (both here and in wp_list_cats, to be true…), and I can’t understand why! :wall:

  35. Gravatar Commento di Dana   (9 commenti)

    Oh no! That’s too bad…

    Thanks for letting me know!

  36. Gravatar Commento di Jack   (3 commenti)

    Hi, thanks for this very great Plugin, but i would like to know how to display the post count you add, i don’t know the code… ? :wall: please help me! :pray:

  37. Gravatar Commento di Zelig   (466 commenti)

    Jack, you have to add the parameter (as explained in the istructions above…) just like the other ones. Anyway the code to use in the function call is the following:
    zelig_dropdown_cats(’post_count=1′)

  38. Gravatar Commento di Jack   (3 commenti)

    thanks for your answer, but this only works with the cats and not with the archives? :)

  39. Gravatar Commento di Zelig   (466 commenti)

    With archives too, Jack:
    wp_get_archives(’show_post_count=true’)
    See reference for more infos.

  40. Gravatar Commento di Jack   (3 commenti)

    sry for gettin on your nervs but thanks for your great help! :thumbup:

  41. Gravatar Commento di Zelig   (466 commenti)

    No problem, Jack. Really. :ciao:

  42. Gravatar Commento di Mike   (1 commento)

    Any chance of turning this and Links into widgets?

  43. Gravatar Commento di Zelig   (466 commenti)

    Not in short time, Mike, I’m sorry. As I was saying above, I don’t use widgets and I don’t have time to study how they work, at present… :-(

  44. Gravatar Commento di Moof   (2 commenti)

    Is there a way to limit the width of the dropdown box? I have a few long category names which I don’t want to exclude or change.

    Thanks - great plug in, by the way!

  45. Gravatar Commento di Zelig   (466 commenti)

    Grab version 1.2, Moof! :wink:

  46. Gravatar Commento di Moof   (2 commenti)

    Thank you! :o )

  47. Gravatar Commento di Marshall   (4 commenti)

    Is there a function to exclude “children of” a category? If not maybe something to consider for future releases. But this is a great plugin!!! Thanks for making it!!

  48. Gravatar Commento di Marshall   (4 commenti)

    One more question, can you do the same thing with pages? I would like a dropdown box for my pages as well. Thanks!

  49. Gravatar Commento di Zelig   (466 commenti)

    Thank you, Marshall. About your first question, at present is not possible to “exclude childrens”, but I promise that I’ll think about it… :)
    Better news with the second one: I’m just testing a new plugin to show a dropdown box for pages, so stay tuned! :wink:

  50. Gravatar Commento di Valerie Williams   (1 commento)

    Just wanted to drop you a note to let you know I’ve got your plugin installed and it works like a charm. Thanks for sharing your hard work!

  51. Gravatar Commento di Jackson   (3 commenti)

    Sorry to bother you, but is there a way for me to have a dropdown list that has a title, so that maybe you see “View Categories” and then when they click on the little dropdown arrow it shows the category names?

    Thanks very much for any help. :roll:

  52. Gravatar Commento di Jackson   (3 commenti)

    Sorry for the question above, I saw the final parameters in the ‘read me’ and saw what I wanted. However, when I tried to use the plugin, this is what it gave me:

    “WordPress database error: [Unknown column ‘category_count’ in ‘field list’]
    SELECT cat_ID, cat_name, category_nicename, category_description, category_parent, category_count FROM wp_categories WHERE cat_ID > 0 ORDER BY cat_name asc

    Warning: Invalid argument supplied for foreach() in /mnt/w0511/d46/s20/b024d5f9/www/blog/wp-content/plugins/zelig-dropdown-cats.php on line 108″

    Can you tell me what I’m doing wrong?

    Thanks a lot.

  53. Gravatar Commento di Zelig   (466 commenti)

    Jackson, I think that your WordPress database has some problems… It’s not possible that you don’t have the “category_count” column in the “wp_categories” table! Which WP version are you running? Did you make any updates recently?

  54. Gravatar Commento di Jackson   (3 commenti)

    I’m using WP 1.5 there. Actually, I don’t know if the problem has to do with the fact that the WP is in a subdirectory but shows up in the main domain name (this was because I host more than one domain on that site and one of them was showing up at this domain name when it wasn’t supposed to).

    Is it possible for me to change the plugin and add the subdirectory name into it, and maybe that will work?

  55. Gravatar Commento di Zelig   (466 commenti)

    I don’t know if that could be the problem, Jackson, but I don’t think so. The plugin code doesn’t use any absolute path. It uses the $wpdb class to access database elements, just like in WP functions dropdown_cats() and wp_list_cats(), so if they work, mine should too (assuming you’ve correctly set up your blog’s dirs in Options/General). Otherwise, I don’t know, I’m sorry. :-(

  56. Gravatar Commento di Dana   (9 commenti)

    Hi!

    I have been using this great plugin on two of my blogs and I have been trying to get it to work on another one. I copied the code from the sidebar file for one of the blogs it is working on, but I don’t seem to be able to get the categories to show up in the dropdown list. I have tried putting the code before the primary sidebar, inside the primary sidebar, between the primary and secondary sidebars, and inside the secondary sidebar and it’s the same everywhere. I do not know where I got this form code from in the first place - maybe there is something wrong with it?

    Here it is:

    Choose…

    Thanks for your help!

  57. Gravatar Commento di Dana   (9 commenti)

    I have been trying to put the code in using #60 and #62 character codes but it won’t let me.

    The code looks just like the one you pasted above for the dropdown archives list. I am sorry I am such an idiot.

  58. Gravatar Commento di Zelig   (466 commenti)

    Sorry Dana, you can’t put code in comments (that’s only for me :mrgreen: )…
    Maybe you’re using plugin version 1.3 now? In this case please note that the code to use in the sidebar is changed! Otherwise, please write me an email with the code, and I promise I’ll try to help you!

  59. Gravatar Commento di Marshall   (1 commento)

    Just checking back to see if you have been able to create a function to exclude “children of” a category for your “dropdown cats” plugin. Please, please, please incorperate in a future version! :pray: I found your “dropdown pages” plugin and it’s awesome! Great work!

  60. Gravatar Commento di Dana   (9 commenti)

    Oh, yes! I had the wrong code. Thanks for pointing that out!

    Great plugin! Thanks!

  61. Gravatar Commento di Zelig   (466 commenti)

    Marshall, you’d like an option to show only “root” categories and exclude ALL childrens, or you want to be able to exclude childrens of some categories only? Because the first case is easy, the second one not so…

  62. Gravatar Commento di Marshall   (4 commenti)

    When I create a new category I have to go to all my pages with a dropdown cats sidebar and tell it to exclude the new category. For example, on my main page in the dropdown cats box I have Movies, Music, News, Sports, TV. If I add a new category with Movies as the parent say Superman then Superman appears in my main dropdown cats box too. If I go to the dropdown cats box for my Sports page I would get Baseball, Basketball, Football, Hockey, Superman. So I have find the category number assigned to Superman and go into the code on all my sidebar pages and tell it to exclude it. The exclude list has become long and takes alot of time to maintain.

    I think the “Show Only” root cats you suggested would work but when I click on Movies in my dropdown cats box on my main page I want it to move to my Movies page and show all the categories I have there in that dropdown box for example Clerks II, Miami Vice, Superman etc.

    Does what I say make sense or have I gotten too convoluted in trying to describe what I’m looking for? Please let me know. Thanks!!!

  63. Gravatar Commento di Knight   (1 commento)

    Anyway to add style to the drop down, the black arial text on white background looks really bad.

  64. Gravatar Commento di Zelig   (466 commenti)

    Rilasciata una nuova versione del plugin (1.4)
    Plugin’s new version released (1.4)

    @Marshall: so you have pages with custom sidebars, quite unusual but interesting. I made this new relese of the plugin with a new option that lets you show only main categories or only childs of a given category. I hope this will help you!

    @Knight: it’s possible to change the style of the list! Just put the code line in a DIV and assign it a class, then define the style options of this class (text, colors and so on) in your style.css file. Just remember to define the “select” element of the class and not just the class itself. For example, supposing that your class name is “dropcat”, you have to use a code like this in the sidebar:


    <div class="dropcat">
    <?php zelig_dropdown_cats(); ?>
    </div>

    And something like this in the style.css file of your template:


    .dropcat select {
    font-size: 11px;
    font-weight: bold;
    font-family: courier;
    color: blue;
    background: #0F0; }
  65. Gravatar Commento di Marshall   (4 commenti)

    Zelig

    You are the GREATEST!!! Thank You so much!!!!:D This update is just what I wanted!!! You have made my life easier!!! Thank you for taking your time to help those of us who are not so gifted with the programming side of things!!! Awesome plugin!!!:D

  66. Gravatar Commento di Gigi Massi   (4 commenti)

    Ciao, scusa se riesumo la discussione…sto cercando di fare una lista a discesa per gli archivi, ma il codice “form” che consigli di usare non mi funziona…come faccio? Per le categorie ho risolto col tuo splendido plugin, vorrei lo stesso risultato per gli archivi, grazie per l’aiuto.

  67. Gravatar Commento di Zelig   (466 commenti)

    Strano che non funzioni, Gigi! Qual’è il problema, di preciso?

  68. Gravatar Commento di Gigi Massi   (4 commenti)

    …semplicemente, gli archivi restano così come sono, nel classico elenco per mesi ;-(

  69. Gravatar Commento di Zelig   (466 commenti)

    E questo è proprio impossibile! Se mi mandi una mail con allegato il tuo sidebar.php, proviamo a capirci qualcosa… :think:

  70. Gravatar Commento di vicky   (6 commenti)

    Fantastico!
    Is there a way to apply css styles on it?

  71. Gravatar Commento di Travis   (2 commenti)

    Awesome plugin! Just what I needed…BUT is there a way to get the current category for child_of=? and If it is a child to get the parent?

    I tried child_of=$cat but no worky. Any ideas?

  72. Gravatar Commento di Zelig   (466 commenti)

    @ vicky: Yes it is, and it’s explained just few comments above:)

    @ Travis: no ideas too, sorry… :-(

  73. Gravatar Commento di Travis   (2 commenti)

    Here you go for anyone who is looking. It also gets the current parent category as the “category” title

    get_queried_object();
    $parentcat = ($cat_object->category_parent) ? $cat_object->category_parent : $cat;
    $thiscat = get_the_category(); $thiscat = $thiscat[0];
    zelig_dropdown_cats(”sort_column=name&boxwidth=200&child_of=”.$parentcat.”&title=”.$thiscat->cat_name.” “); ?>

  74. Gravatar Commento di Zelig   (466 commenti)

    Very nice, Travis! Thank you very much!!! :clap:

  75. Gravatar Commento di vicky   (6 commenti)

    :doh:

    Thank you ever so much!!!

  76. Gravatar Commento di vicky   (6 commenti)

    Zelig, i’m trying to display the children of 6 different categories in different drop down lists. One drop down list for each category. I have added, for example the: &child_of=1, for each category, to display the children of each category.
    It only shows the children of one category though. I don’t understand why??
    Is it not possible to do this?

    Could you have a look at the website? It’s in greek but it should make sense.

  77. Gravatar Commento di Zelig   (466 commenti)

    You’re right, vicky: it seems there’s a bug! :-(
    The “child_of” option doesn’t work if you use multiple instances of the function in the same page.
    I’m sorry, I’ll try to fix it.

  78. Gravatar Commento di vicky   (6 commenti)

    much appreciated..
    thanks zelig :thumbup:

  79. Gravatar Commento di Zelig   (466 commenti)

    Well, Vicky, I looked at it better today, and in fact the plugin is working well, it’s not a bug. I’ve been fooled in my first test, because I just added some subcategories and tried it. Maybe the same thing happened to you: if subcategories are empty, you don’t see them by default! You must set the “hide_empty=0″ option too!

  80. Gravatar Commento di vicky   (6 commenti)

    I didn’t realize.. :roll:
    thanx zelig :ciao:

  81. Gravatar Commento di Terje   (1 commento)

    Nice work :)
    What about doing a dropdownbox for Archive to?

  82. Gravatar Commento di Zelig   (466 commenti)

    Once again… for dropdown archives read here.

  83. Gravatar Commento di ectostan   (1 commento)

    Fantastic plug-in! Did something very few plug-ins do: worked immediately!

    I may have overlooked this above: is there any way to make the last category that was selected persist in the box, instead of defaulting back to ‘categories’ or whatever I have in the first row? I’ve played around with “title=” , but can’t get it to work.

  84. Gravatar Commento di Zelig   (466 commenti)

    @ectostan: I don’t know, sorry :(

  85. Gravatar Commento di Tom Rose   (1 commento)

    Great plugin. Thanks for working on this.

  86. Gravatar Commento di Marshall   (3 commenti)

    Can you show me an example of how to make the “file” function work?

    This is what I have in my sidebar now

    In reading your description above you write that the default for “file” is index.php. I want it to be category-70.php but I can’t seem to get it to work. Is there something I’m missing?

    Thanks,

  87. Gravatar Commento di Marshall   (3 commenti)

    My last post took out the code I put in so I’m trying again but removing the from the ends. Hope this works

    php zelig_dropdown_cats(’file=category-70.php&sort_order=desc&child_of=70′);

  88. Gravatar Commento di Marshall   (3 commenti)

    Any one???

  89. Gravatar Commento di Zelig   (466 commenti)

    I’m sorry, Marshall, but you’re right. The “file” option is not working… :(
    I’ll remove it from the options list asap (no time to work on it and try to fix, at present, sorry).

  90. Gravatar Commento di Marshall   (1 commento)

    Sorry to hear that! But thank you for all you do Zelig! Your plugins have greatly helped many of us who can’t do what you do. I will check back periodically in the hopes that a future release will correct the ‘file’ issue :pray: Again, thanks!

  91. Gravatar Commento di Clark   (1 commento)

    Is there a way to pass a the category ID of the current category into the child_of parameter?
    I’m unable to get the child_of parameter to work? zelig_dropdown_cats(’sort_column=name&title=Model&boxwidth=220&child_of=3′); yields an empty pull down menu titled Model, even though category 3 has many subcategories.

    Great work! I’m excited to use this in my site. Thanks!

  92. Trackback da Vindictive Bastard
  93. Gravatar Commento di Zfen   (1 commento)

    Thank you. Just what i needed. :thumbup:

  94. Gravatar Commento di Bock the Robber   (3 commenti)

    Zelig

    In my blog I have a category “favourite posts”.

    How can I make a dropdown box to display these posts and no other categories?

  95. Gravatar Commento di Zelig   (466 commenti)

    Bock, actually you can only play with the “exclude” option, manually excluding all other categories. Maybe in a future release I’ll try to ad an “include” option too…

  96. Gravatar Commento di seo pune   (1 commento)

    thank you very much!

  97. Gravatar Commento di Des Walsh   (2 commenti)

    I’m getting error messages on the Write Post page. Site host support wonders if it’s because WP 2.3 is installed and the plugin may not be configured for that.

  98. Gravatar Commento di Zelig   (466 commenti)

    I don’t know, Des, I’ve never tested this plugin under WP 2.3…
    (but what is involved this plugin with the write post page?)

  99. Gravatar Commento di Des Walsh   (2 commenti)

    Zelig
    Thanks for replying. My apologies - I got confused with another plugin for dropdown archives. But with your plugin for dropdown cats i get the following in the sidebar, followed by the dropdown box with the word “Categories” in it but no dropdown cats>
    _______________

    WordPress database error: [Table ‘wordpress_thinkinghomebusiness_com.wp_categories’ doesn’t exist]
    SELECT cat_ID, cat_name, category_nicename, category_description, category_parent, category_count FROM wp_categories WHERE cat_ID > 0 ORDER BY cat_ID asc

    WordPress database error: [Table ‘wordpress_thinkinghomebusiness_com.wp_categories’ doesn’t exist]
    SELECT cat_ID, COUNT(wp_post2cat.post_id) AS cat_count FROM wp_categories INNER JOIN wp_post2cat ON (cat_ID = category_id) INNER JOIN wp_posts ON (ID = post_id) WHERE post_status = ‘publish’ AND post_date_gmt < ‘2007-09-12 11:38:47′ GROUP BY category_id

  100. Gravatar Commento di DarioDN   (1 commento)

    1) hide_empty non mi funziona (mostra cmq la categoria uncategorized almeno : )
    2) come fare per “indentare” le sottocategorie, così come accade nel plugin per le pagine?

  101. Gravatar Commento di Zelig   (466 commenti)

    @Des: I suppose it’s a 2.3 issue. Maybe database is changed, I don’t know, sorry.

    @Dario: l’indentazione non è attualmente supportata, mi dispiace. Per quanto riguarda l’hide_empty non saprei, nelle mie prove funziona, ma non ho fatto test sulle ultime versioni di WP e potrebbe essere quello il problema.

  102. Gravatar Commento di adam bell   (1 commento)

    Wow, that is a great plug in, thank you

  103. Gravatar Commento di earl-ku   (1 commento)

    Zelig, is there any fix for wp2.3 with the drop down categories? i got the same problem like Des Walsh…

  104. Gravatar Commento di Zelig   (466 commenti)

    I’m sorry, but no fixes are available or will be in short time. Development and support for WP plugins is currently stopped (due to lack of time…) :cry:

  105. Gravatar Commento di damnprinter   (1 commento)

    Why no hierarchical=1 parameter ?

    It looks a lot better when the child categories are indented.

  106. Gravatar Commento di Zelig   (466 commenti)

    I believe but, as I’ve said one comment above, development and support for my plugins is currently stopped.

  107. Gravatar Commento di Catherine   (1 commento)

    Just for the record, this can be inserted into a text widget if you have a plugin like RunPHP or ExecPHP. That’s what I did.

    Unfortunately, I’m running 2.3.1 so while the plugin works I still have the problem noted with the 2.3 incompatibility. :wall:

  108. Gravatar Commento di Chikatze   (7 commenti)

    oh no! i have wp 2.3.2 now… and it doesn’t work anymore. :(

  109. Gravatar Commento di Chikatze   (7 commenti)

    could you please help me again?? i put

    in my sidebar code, but it doesn’t work anymore. :( (
    what could be the reason???

  110. Gravatar Commento di james   (1 commento)

    drop down cats not working in wordpress 2,5….hmmm not sure what changed..

  111. Gravatar Commento di Keren   (1 commento)

    Thks……..it working in my blog….thanks a lot :clap:

  112. Gravatar Commento di Register   (1 commento)

    Great job. I spend hours to find an solution to make it before found this.
    Congrats. :thumbup:

  113. Gravatar Commento di NZ Mobiles   (1 commento)

    Works for me, thanks Zelig

  114. Gravatar Commento di vicky   (6 commenti)

    Does it work with Wordpress 2.7? Has anyone used it with this version?

  115. Gravatar Commento di Dereck   (2 commenti)

    I don’t quite get it what does this plugin do, but I will give it a try. Thanks

  116. Gravatar Commento di Rasell   (2 commenti)

    I tried to place the code on several free themes, and there was no problem, but I had real problem with one theme. Lost 2 hours copy and paste. Let’s see if everything will be OK.

  117. Gravatar Commento di Tomas   (1 commento)

    It’s working fine, I just tried on 5 themes.

  118. Gravatar Commento di niccseh   (1 commento)

    It’s realy great you’ve done. One question: Is it possible to have the plugin generate the list with a submit button instead of the jump function? Thanks.

  119. Gravatar Commento di Zelig   (466 commenti)

    Of course it is, niccseh.
    Just don’t ask me to do it! :shifty:

  120. Gravatar Commento di Linda   (1 commento)

    Is there a way to apply css styles on it?

  121. Gravatar Commento di Zelig   (466 commenti)

    Yes, Linda. Please read this comment above.

Scrivi un commento

:) :D :( :o 8O :? 8) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen: :clap: :dance: :doh: :drool: :eh: :hand: :liar: :naughty: :pray: :shhh: :shifty: :sick: :silenced: :snooty: :think: :wall: :whistle: :love: :censored: :crazy: :food: :thumbup: :ciao: :cheers: :winky: :kiss: :rotfl: :ninja:

  

NOTE SUI COMMENTI:

  • Se non avete mai scritto nulla su questo blog, sappiate che il vostro primo commento dovrà essere approvato manualmente dall'amministratore e quindi non comparirà subito sul sito.
  • E' possibile usare dei tag HTML nel testo del commento, ma solamente quelli validi come XHTML "Strict" verranno accettati, quindi il risultato potrebbe anche essere un po' diverso dal previsto... nel dubbio, usate il testo semplice!
  • Questo blog supporta i "Gravatar": utilizzate lo stesso indirizzo e-mail con cui vi siete registrati e la vostra immagine comparirà automaticamente nel vostro commento. Se non avete ancora un gravatar, registratevi subito su www.gravatar.com!
  • La vostra e-mail, che comunque resterà sempre riservata, serve anche per il conteggio del totale dei vostri commenti e per inviarvi, se ne fate richiesta, gli avvisi di eventuali nuovi commenti.

Altri articoli nella stessa categoria

Ultimi articoli pubblicati, escluso questo, in "Computer"

Articolo precedente

Articolo successivo


Copyright © 1997-2009 Corrado "Zelig". Tutti i diritti riservati (vedi note legali)

NB: state visualizzando questo sito nella versione ottimizzata per dispositivi portatili (cellulari, palmari, ecc.) oppure con un browser "datato" che non consente di visualizzare correttamente i fogli di stile (CSS). I contenuti del sito sono comunque gli stessi e le differenze riguardano solamente l'aspetto estetico, che sarebbe molto più "piacevole" se visualizzato con un browser più recente!