Articolo multilingue / Multilanguage post
Approfitto di una richiesta che mi è stata fatta, a seguito di un mio articolo di alcuni giorni fa, per realizzare e pubblicare il mio primo plugin per WordPress!
Questo plugin mostra le categorie nella sidebar come una semplice lista di selezione a discesa. A differenza della funzione dropdown_cats di WordPress, dà anche la possibilità di escludere alcune categorie dalla lista.
Non so se un plugin del genere esistesse già o se ci fossero altri modi per ottenere lo stesso risultato, ma comunque mi sono divertito a farlo e quindi va bene lo stesso!
ISTRUZIONI:
- Scaricare il file zip (la versione attuale è la 1.4 del 12 ottobre 2006).
- Estrarre il file zelig-dropdown-cats.php nella cartella dei plugin della vostra installazione di WordPress (wp-content/plugins).
- Entrare nel pannello di amministrazione di WordPress, aprire la pagina dei Plugin e attivare il plugin stesso.
- Inserire il seguente codice HTML da qualche parte in una pagina del vostro template, fuori dal loop (il suo posto naturale è nella sidebar):
<?php zelig_dropdown_cats(); ?>
IMPORTANTE: se si aggiorna il plugin da una versione precedente alla 1.2, rimuovere tutta la parte di codice precedentemente richiesta in questo punto e lasciare solamente la chiamata alla funzione come indicato sopra.
La funzione zelig_dropdown_cats() ha alcuni parametri che possono essere specificati:
| Parametro |
Valori |
Descrizione |
Default |
| sort_column |
name id |
tipo di ordinamento (in base al nome o al numero ID) |
id |
| sort_order |
asc desc |
direzione di ordinamento (ascendente o discendente) |
asc |
| file |
testo |
nome del file php da usare per visualizzare le categorie selezionate (NON FUNZIONA!) |
index.php |
| hide_empty |
0 1 |
1 nasconde le categorie vuote, 0 le mostra comunque |
1 |
| exclude |
numero o elenco di numeri separati da virgole |
categoria o elenco di categorie (numeri ID) da escludere dalla lista |
|
| post_count |
0 1 |
se impostato a 1, mostra il numero di articoli presente in ogni categoria |
0 |
| title |
testo |
testo che compare nella list box quando è chiusa. Se non si desidera questa prima riga di intestazione, specificare questo parametro senza nessun valore (’title=’) |
“Categories” (o “Categorie” se avete WP localizzato in italiano) |
| boxwidth |
numero |
larghezza della list box in pixel. Se non specificata o se impostata a zero, la lista assumerà la larghezza del nome più lungo delle categorie che contiene. Se invece viene impostato un valore, i nomi eventualmente più lunghi potrebbero essere troncati in quel punto a seconda del browser utilizzato (IE6…) |
0 |
| child_of |
numero |
Se non impostato o se impostato a -1 mostra tutte le categorie e sottocategorie. Se impostato a 0 mostra solo le categorie principali escludendo tutte le sottocategorie. Se impostato con un numero di categoria (numero ID) mostra solo le sottocategorie di quest’ultima. |
-1 |
ESEMPI:
<?php zelig_dropdown_cats('sort_column=name'); ?>
mostra la lista ordinata per nome.
<?php zelig_dropdown_cats('sort_column=name&exclude=1,3,5,6'); ?>
mostra la lista ordinata per nome, escludendo le categorie 1, 3, 5 e 6.
<?php zelig_dropdown_cats('sort_order=desc&hide_empty=0'); ?>
mostra la lista in ordine discendente, elencando anche le categorie vuote.
<?php zelig_dropdown_cats('title=Scegli una categoria&boxwidth=120'); ?>
visualizza “Scegli una categoria” come titolo nella list box e imposta la larghezza a 120 pixel.
<?php zelig_dropdown_cats('title=&post_count=1&child_of=0'); ?>
non visualizza la prima riga con il titolo, aggiunge il numero di post per ogni categoria e mostra solo le categorie principali escludendo le sottocategorie.
NOTE:
Il codice restituito dalla funzione è valido XHTML Strict.
Plugin testato con WordPress 1.5.2 e 2.0.x.
AGGIORNAMENTI:
- Versione 1.4 (12 ottobre 2006): aggiunta l’opzione “child_of” per escludere la visualizzazione delle sottocategorie o per visualizzare solo le sottocategorie di una determinata categoria. Un’altra piccola modifica consente ora di utilizzare più istanze della funzione nella stessa pagina.
- Versione 1.3 (26 agosto 2006): aggiunta la possibilità di escludere la prima riga con il titolo nella list box. Inoltre, se il titolo non viene specificato, viene utilizzata come default la traduzione localizzata di “Categories”, se disponibile.
- Versione 1.2 (14 agosto 2006): semplificato il codice da inserire nella sidebar e aggiunte le due opzioni “title” e “boxwidth”.
- Versione 1.1 (7 giugno 2006): aggiunta l’opzione “post_count” per mostrare accanto al nome di ogni categoria anche il numero di articoli pubblicati.
Tutti i plugin per Wordpress di Zelig li trovi qui!
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:
- Download the zip file (current version is 1.4 of october 12, 2006).
- Extract the zelig-dropdown-cats.php file into the plugins directory in your WordPress installation (wp-content/plugins).
- Log in to WordPress administration. Go to the Plugins page and Activate this plugin.
- 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!
Questo articolo è stato scritto da Zelig il
23 Gennaio 2006 alle ore 21:44 ed è catalogato come "Computer".
Puoi seguire i commenti a questo articolo mediante il feed RSS 2.0.
Puoi anche scrivere un commento o inviare un trackback dal tuo sito.
23 Gennaio 2006 - ore 22:14
Grazieeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
24 Gennaio 2006 - ore 21:45
Pregooooooo
30 Gennaio 2006 - ore 19:51
Grande Zelig … grandissimo !
7 Febbraio 2006 - ore 19:56
ehilà….rieccomi qui: chissà se questo plugin funziona con wordpress 2.0.1?!?
7 Febbraio 2006 - ore 21:22
Già, chissà…
Aspetto qualcuno che faccia una prova!
7 Febbraio 2006 - ore 21:48
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
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
8 Febbraio 2006 - ore 21:51
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..
9 Febbraio 2006 - ore 22:25
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
11 Febbraio 2006 - ore 13:31
Grazie per il test!
18 Febbraio 2006 - ore 01:49
Hi! Thank you so much for that plugin!
Do you have such for the archieves as well??? or how can i do?
18 Febbraio 2006 - ore 12:28
Thanks, Chikatze. Exactly, what do you need to do with archives? Just show them as a dropdown list or something else?
21 Febbraio 2006 - ore 16:33
si che va!
18 Marzo 2006 - ore 14:35
Thank you!
7 Aprile 2006 - ore 20:45
I love this plugin. Is there a way to apply it to the link categories as well?
8 Aprile 2006 - ore 18:21
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…
26 Aprile 2006 - ore 17:32
this plugin is great.
thank you for the time you spent makin’ us happy ^^
greetz from germany
3 Giugno 2006 - ore 11:09
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!
4 Giugno 2006 - ore 01:31
it’s a really cool plugin. gotta check it out. thank you for ur work!
7 Giugno 2006 - ore 20:53
OK, Jayne.
You got it!
10 Giugno 2006 - ore 11:56
What a cool plugin!
I use it at my blog(written in Japanese) and it works well
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?
10 Giugno 2006 - ore 16:56
@Zelig:
No, only as a dropdown.
10 Giugno 2006 - ore 16:57
Of course you can, aka!
10 Giugno 2006 - ore 19:13
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>
11 Giugno 2006 - ore 01:06
Thank you.
But, sorry, it didn’t work.
What did I wrong?
Might you take a look at my weblog? (German Part)
11 Giugno 2006 - ore 07:51
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/
11 Giugno 2006 - ore 10:15
Please help me!! (T-T) What did I do wrong???
11 Giugno 2006 - ore 10:53
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…
11 Giugno 2006 - ore 11:37
Now it works!
Thank you sooooo much!
21 Luglio 2006 - ore 22:41
help me.. can you help me to made dropdown links on wordpress? i wait your information at my mail,
thanks befor.
29 Luglio 2006 - ore 21:55
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!
30 Luglio 2006 - ore 20:32
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.
30 Luglio 2006 - ore 23:53
Thanks! I appreciate your getting back to me!
1 Agosto 2006 - ore 14:15
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!
3 Agosto 2006 - ore 20:40
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!
3 Agosto 2006 - ore 23:28
Oh no! That’s too bad…
Thanks for letting me know!
4 Agosto 2006 - ore 06:19
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… ?
please help me!
4 Agosto 2006 - ore 20:37
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′)
4 Agosto 2006 - ore 20:57
thanks for your answer, but this only works with the cats and not with the archives?
5 Agosto 2006 - ore 17:14
With archives too, Jack:
wp_get_archives(’show_post_count=true’)
See reference for more infos.
5 Agosto 2006 - ore 17:19
sry for gettin on your nervs but thanks for your great help!
5 Agosto 2006 - ore 20:31
No problem, Jack. Really.
9 Agosto 2006 - ore 15:26
Any chance of turning this and Links into widgets?
9 Agosto 2006 - ore 20:30
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…
13 Agosto 2006 - ore 18:10
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!
14 Agosto 2006 - ore 18:13
Grab version 1.2, Moof!
14 Agosto 2006 - ore 18:44
Thank you!
)
22 Agosto 2006 - ore 05:22
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!!
22 Agosto 2006 - ore 06:14
One more question, can you do the same thing with pages? I would like a dropdown box for my pages as well. Thanks!
22 Agosto 2006 - ore 20:41
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!
23 Agosto 2006 - ore 16:17
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!
26 Agosto 2006 - ore 01:46
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.
26 Agosto 2006 - ore 15:28
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.
26 Agosto 2006 - ore 17:55
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?
27 Agosto 2006 - ore 14:52
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?
28 Agosto 2006 - ore 20:14
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.
26 Settembre 2006 - ore 21:58
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!
26 Settembre 2006 - ore 22:06
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.
28 Settembre 2006 - ore 21:02
Sorry Dana, you can’t put code in comments (that’s only for me
)…
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!
30 Settembre 2006 - ore 23:31
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!
I found your “dropdown pages” plugin and it’s awesome! Great work!
1 Ottobre 2006 - ore 14:08
Oh, yes! I had the wrong code. Thanks for pointing that out!
Great plugin! Thanks!
2 Ottobre 2006 - ore 20:50
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…
8 Ottobre 2006 - ore 14:02
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!!!
11 Ottobre 2006 - ore 05:22
Anyway to add style to the drop down, the black arial text on white background looks really bad.
12 Ottobre 2006 - ore 18:45
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; }
13 Ottobre 2006 - ore 03:35
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
4 Novembre 2006 - ore 21:07
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.
5 Novembre 2006 - ore 16:26
Strano che non funzioni, Gigi! Qual’è il problema, di preciso?
6 Novembre 2006 - ore 10:01
…semplicemente, gli archivi restano così come sono, nel classico elenco per mesi ;-(
6 Novembre 2006 - ore 22:03
E questo è proprio impossibile! Se mi mandi una mail con allegato il tuo sidebar.php, proviamo a capirci qualcosa…
13 Novembre 2006 - ore 16:41
Fantastico!
Is there a way to apply css styles on it?
13 Novembre 2006 - ore 23:29
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?
14 Novembre 2006 - ore 20:28
@ vicky: Yes it is, and it’s explained just few comments above…
@ Travis: no ideas too, sorry…
14 Novembre 2006 - ore 23:13
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.” “); ?>
15 Novembre 2006 - ore 09:30
Very nice, Travis! Thank you very much!!!
15 Novembre 2006 - ore 11:33
Thank you ever so much!!!
17 Novembre 2006 - ore 21:45
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.
21 Novembre 2006 - ore 22:14
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.
22 Novembre 2006 - ore 19:38
much appreciated..
thanks zelig
24 Novembre 2006 - ore 19:54
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!
24 Novembre 2006 - ore 23:17
I didn’t realize..
thanx zelig
19 Dicembre 2006 - ore 13:33
Nice work
What about doing a dropdownbox for Archive to?
19 Dicembre 2006 - ore 18:14
Once again… for dropdown archives read here.
20 Dicembre 2006 - ore 21:05
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.
22 Dicembre 2006 - ore 10:04
@ectostan: I don’t know, sorry
22 Dicembre 2006 - ore 17:32
Great plugin. Thanks for working on this.
31 Gennaio 2007 - ore 23:48
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,
31 Gennaio 2007 - ore 23:51
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′);
12 Febbraio 2007 - ore 15:21
Any one???
12 Febbraio 2007 - ore 19:12
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).
13 Febbraio 2007 - ore 20:25
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
Again, thanks!
3 Marzo 2007 - ore 22:38
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!
14 Aprile 2007 - ore 19:27
Thank you. Just what i needed.
17 Maggio 2007 - ore 19:33
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?
21 Maggio 2007 - ore 13:42
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…
15 Agosto 2007 - ore 12:34
thank you very much!
12 Settembre 2007 - ore 02:34
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.
12 Settembre 2007 - ore 09:28
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?)
12 Settembre 2007 - ore 13:45
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
12 Settembre 2007 - ore 23:02
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?
14 Settembre 2007 - ore 11:14
@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.
14 Settembre 2007 - ore 15:52
Wow, that is a great plug in, thank you
25 Settembre 2007 - ore 15:56
Zelig, is there any fix for wp2.3 with the drop down categories? i got the same problem like Des Walsh…
25 Settembre 2007 - ore 20:47
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…)
2 Ottobre 2007 - ore 21:58
Why no hierarchical=1 parameter ?
It looks a lot better when the child categories are indented.
3 Ottobre 2007 - ore 09:22
I believe but, as I’ve said one comment above, development and support for my plugins is currently stopped.
29 Novembre 2007 - ore 05:42
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.
5 Gennaio 2008 - ore 03:08
oh no! i have wp 2.3.2 now… and it doesn’t work anymore.
13 Febbraio 2008 - ore 22:46
could you please help me again?? i put
in my sidebar code, but it doesn’t work anymore.
(
what could be the reason???
15 Aprile 2008 - ore 12:44
drop down cats not working in wordpress 2,5….hmmm not sure what changed..
28 Aprile 2008 - ore 05:01
Thks……..it working in my blog….thanks a lot
5 Maggio 2008 - ore 13:12
Great job. I spend hours to find an solution to make it before found this.
Congrats.
1 Gennaio 2009 - ore 08:07
Works for me, thanks Zelig
22 Gennaio 2009 - ore 11:49
Does it work with Wordpress 2.7? Has anyone used it with this version?
22 Gennaio 2009 - ore 20:54
I don’t quite get it what does this plugin do, but I will give it a try. Thanks
27 Gennaio 2009 - ore 23:34
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.
5 Febbraio 2009 - ore 23:07
It’s working fine, I just tried on 5 themes.
12 Marzo 2009 - ore 18:36
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.
14 Marzo 2009 - ore 09:57
Of course it is, niccseh.
Just don’t ask me to do it!
19 Marzo 2009 - ore 14:51
Is there a way to apply css styles on it?
20 Marzo 2009 - ore 09:17
Yes, Linda. Please read this comment above.
14 Agosto 2009 - ore 08:32
Zelig, there’s no other plugin like yours out there. Is there any chance you will be upgrading it for the latest versions of wordpress?
17 Agosto 2009 - ore 10:09
Still too busy, vicky, I’m really sorry.
12 Settembre 2009 - ore 16:26
Maybe some update will bring some more interest to your plugin.