[EventCalendar] Archives Sorted By Event Date

Liam Sarsfield liams.email at gmail.com
Mon Mar 30 02:47:43 UTC 2009


Hi there chaps, hope everything is going well, goodjob on getting ranked so
high Alex,

Here is todays problem: If you remember a few months ago I offered up the
code for a bolt-on that allows us to sort our categories by event date.

Here is the code for that just in case:

function bsuite_order_ec3_posts_where( &$where ){
>     global $ec3,$wp_query,$wpdb;
>
>     if( $wp_query->is_admin )
>         return($where);
>
>     if( $wp_query->is_category && !$wp_query->is_date ){
>         $where.=" AND (ec3_sch.end>='$ec3->today')";
>         $ec3->join_ec3_sch=true;
>         $ec3->order_by_start=true;
>         add_filter('posts_orderby','ec3_filter_posts_orderby');
>     }
>     return $where;
> }
>
> add_filter('posts_where',  'bsuite_order_ec3_posts_where',12);


Now everything works great but heres what I'm trying to do. Recently, I
noticed that we lose a lot of hits because when a posting for an event
expires it goes to the archives where google wont pick it up. This is partly
due to the fact that I've removed any link to any archives on our site. What
I'm trying to do is have the archives sorted by event date - now I know this
is quite a bit harder because archive categories are by posting date, so
naturally (not being much of a php coder) I'm trying to work around it.

So I consulted the advanced queries and thought I'd just create a link list
in my sidebar that links to various queries. This was going to work until I
realized that this query brings up the resulsts on my mainindex page, which
I've modded to look in a certain way and which isnt suited for displaying
data. Is it possible to switch this over to have it appear just on a regular
search or category page? How should I go about doing this?

As always, let me know if there isnt anything that is clear in my message,

Your help is always much appreciated,

Regards,

Liam Sarsfield
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://penguin.firetree.net/pipermail/eventcalendar/attachments/20090329/bd036df3/attachment.htm


More information about the EventCalendar mailing list