[EventCalendar] Problem with wp_list_categories() in EC 3.1.4

Ben Hayes ben at jackfruitdesign.com
Mon Dec 22 19:29:34 UTC 2008


Thanks Alex

I think you're right. I tried turning off the plugin and I got the  
same thing. I'm not sure why, but when the category is empty, my code  
doesn't get the sibling categories as it should, instead it returns  
all categories in the system.

But you're right, I don't think it's a problem with the EC plugin.

I will have to investigate further

Ben


On 22 Dec 2008, at 18:56, Alex Tingle wrote:

>
> On 22 Dec 2008, at 17:40, Ben Hayes wrote:
>
>> Hi, I sent this last week to the list but didn't see any response  
>> to it... not sure if that's because it got lost, or because it's  
>> too difficult, or I didn't explain it properly, or what... just  
>> having another go...
>
> Sorry Ben,
>
> I'm not snubbing you. I just don't have anything useful to say about  
> your problem.
>
>
>> Cheers
>>
>> Ben
>>
>> ==========================
>>
>> I'm running WP 2.7
>>
>> I have a list of categories functioning as sub-navigation. So in  
>> other words I get the children of  the current category and list  
>> them using wp_list_categories().
>>
>>  $cat = get_the_category();
>>  $parentId = $cat[0]->parent;
>>  wp_list_categories('order=DESC&title_li=&child_of=' . $parentId);
>>
>> I have a category called 'Events' for which I'm using the EC  
>> plugin. So 'events' is just one item in my subnavigation alongside  
>> other things.
>>
>> It works fine if there is at least 1 event in the current view  
>> (i.e. it shows a calendar with at least 1 event on it). But if the  
>> calendar is empty, then it breaks my wp_list_categories code and  
>> instead just lists *all* categories (i.e. not just the children -  
>> it breaks the sub-navigation).
>>
>> Any ideas how I could fix this? It used to be OK in EC version 3.1.1
>
> I strongly suspect that your diagnosis of the problem is incorrect.  
> As far as I know, wp_list_categories() is implemented using its own  
> SQL. Nothing EC does should affect it.
>
> Try turning off the EC plug-in. How does that affect the behaviour?
>
> If that *does* affect the behaviour, then at least we'll have  
> something to investigate... come back here and describe what you find.
>
>
>> P.S. I don't know if this is intentional (maybe it is) but it is  
>> impossible to leave comments on http://wpcal.firetree.net/ because  
>> you have to register first and there's no link to register...
>
> That's intentional. If people leave comments there, then no one  
> answers them and their problems don't get solved. (Obviously,  
> questions can go unanswered here too :-( )
>
> -Alex
>
>
>
> _______________________________________________
> Blog: http://wpcal.firetree.net/
> EventCalendar at firetree.net mailing list
> Unsubscribe: http://penguin.firetree.net/eventcalendar




More information about the EventCalendar mailing list