| View previous topic :: View next topic |
| Author |
Message |
Eric Guest
|
Posted: Thu Dec 23, 2004 12:04 pm Post subject: Sub Categories Not Working Right |
|
|
I'm working on agape.blogsome.com, and I'm having trouble with the subcategories. They do have posts in them.
I have the following structure set up for my categories
General
Issues, News, Politics
- Local
That's Funny
What's Happening
- General Announcements
- Kids Calendar
- Youth
I've tried this:
{list_cats children=0 hide_empty=0 optioncount=1 all='All' sort_column='name'}
Which returns just the top level categories in order. Fine.
And this:
{list_cats children=1 hide_empty=0 optioncount=1 all='All' sort_column='name'}
Which returns all categories including subcategories, but they're all sorted as if they were top level categories.
So it comes out looking like this:
General
General Announcements
Issues, News, Politics
Kids Calendar
Local
That's Funny
What's Happening
Youth
What am I missing? I've tried playing with the recurse parameter, and all the standard help at wiki.wordpress.org, and am stuck. |
|
| Back to top |
|
spoutnik
Joined: 02 Feb 2005 Posts: 54 Location: Belgique - Bruxelles
|
Posted: Sun Feb 27, 2005 10:32 pm Post subject: |
|
|
I have always the same problem as you. It seems there is no solution on blogsome. I also tried everything I found with no results.
So byebye subcategories in blogsome. _________________ Le molenbeekois perdu dans la grisaille bruxelloise est heureux de se joindre à vous.
http://melain.blogsome.com |
|
| Back to top |
|
jimrb
Joined: 28 Feb 2005 Posts: 8 Location: Merritt Island, FL
|
Posted: Wed Mar 02, 2005 4:11 am Post subject: sub-categories don't display properly under category list |
|
|
I'm having same problem too, have already spent several hours trying to find a solution. If anyone finds a way to solve this please email me at uu110 at earthlink dot net. I suppose until then I will have to convert all sub-categories to top level categories.
Also, if Admin reads this, I hope you will consider installing a spellchecker pluging for wordpress.
Thanks, Jim _________________ http://jsblog.blogsome.com/ |
|
| Back to top |
|
splash
Joined: 09 Feb 2005 Posts: 107 Location: Japan
|
Posted: Wed Mar 02, 2005 4:45 pm Post subject: How to show the sub categories in the right way |
|
|
Add hierarchical='true' or hierarchical='1' it solved the problem in my case.
"Template Tags/wp list cats" http://codex.wordpress.org/Template_Tags/wp_list_cats says that the hierarchical parameter can't be used in versions of WordPress prior to 1.5.
Blogsome uses WordPress 1.3 or something, doesn't it? How come it works?  |
|
| Back to top |
|
jimrb
Joined: 28 Feb 2005 Posts: 8 Location: Merritt Island, FL
|
Posted: Wed Mar 02, 2005 5:48 pm Post subject: |
|
|
Splash,
Thanks for the fix, but I can't get it to work for me. Could you telll me how u got it to work on your site? Could you send the link to your site or a blogsome site with sub-cats displaying properly so I can see what it should look like?
This is what I found at the link u gave:
http://codex.wordpress.org/Template_Tags/wp_list_cats
"hierarchical
(boolean) Sets whether to display child (sub) categories in a hierarchical (after parent) list. Valid values:
* 1 (True - default)
* 0 (False)
Note: The hierarchical parameter is not available in versions of WordPress prior to 1.5"
and this is what I have that doesn't show sub-cats properly:
<ul><li>Categories:
<ul>
{list_cats hierarchical='true' hide_empty='0' optional='1' all='All' optioncount='1' sort_column='name'}
</ul>
</li></ul>
I also tried ='1' instead of 'true' , but that was no more successful
both cat and sub-cat have posts assigned to them
did I input the argument correctly?
any other suggestions?
also, does anyone know why blogsome doesn't upgrade to wordpress 1.5? or offer both versions? and more plugins?
Thanks, Jim _________________ http://jsblog.blogsome.com/ |
|
| Back to top |
|
spoutnik
Joined: 02 Feb 2005 Posts: 54 Location: Belgique - Bruxelles
|
Posted: Thu Mar 03, 2005 12:50 am Post subject: |
|
|
It works fine for me this time.
I have the following code in my sidebar
<h2>Categories:</h2>
<ul>
{list_cats optional='1' all='All' optioncount='1' sort_column='name' hierarchical='1' children="1"}
</ul>
and it does the job.
It's maybe [b]children="1"[/b] that cause your problem. Don't know
Thanks for the trick anyway _________________ Le molenbeekois perdu dans la grisaille bruxelloise est heureux de se joindre à vous.
http://melain.blogsome.com |
|
| Back to top |
|
shuaibao
Joined: 13 Feb 2005 Posts: 36 Location: Wellesley
|
Posted: Thu Mar 03, 2005 1:52 am Post subject: |
|
|
| Odd....works for me, maybe you shouldn't tweak the code.... |
|
| Back to top |
|
splash
Joined: 09 Feb 2005 Posts: 107 Location: Japan
|
Posted: Thu Mar 03, 2005 1:58 am Post subject: |
|
|
| As spoutnik said, you need to add children='1' Try it. |
|
| Back to top |
|
jimrb
Joined: 28 Feb 2005 Posts: 8 Location: Merritt Island, FL
|
Posted: Thu Mar 03, 2005 3:13 am Post subject: |
|
|
Thanks Spoutnik, that fixed it.
You were right it was the children argument.
I just added/inserted that into my arguments and it worked.
ur welcome for the trick, whatever it was. Now I'm givin' away tricks and don't even know it...I'd be a po ho.
Thanks again, Jim _________________ http://jsblog.blogsome.com/ |
|
| Back to top |
|
jimrb
Joined: 28 Feb 2005 Posts: 8 Location: Merritt Island, FL
|
Posted: Thu Mar 03, 2005 3:26 am Post subject: |
|
|
shuaibao, I'm not sure I understand what you mean? could you explain please?
| shuaibao wrote: | | Odd....works for me, maybe you shouldn't tweak the code.... |
just because a solution works for one person doesn't mean it will work for all
If it's not working and I don't tweak the code it has been my experience that it normally doesn't fix itself
if the first tweak doesn't fix it, sometimes you need to tweak, tweak again till it does
Thanks tho, I'll keep it in mind.
Thanks again all for the help, hopefully this will help some future sub-categorizer
Jim _________________ http://jsblog.blogsome.com/ |
|
| Back to top |
|
|