[EventCalendar] Problem with wp_list_categories() in EC 3.1.4

Alex Tingle alex at firetree.net
Mon Dec 22 18:56:54 UTC 2008


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





More information about the EventCalendar mailing list