[EventCalendar] Archive page of all past events

Alex Tingle alex at firetree.net
Thu Oct 30 11:14:37 UTC 2008


pulk wrote:
> I've got a <?php  if (is_home()) query_posts("cat=1"); ?> in my index,
> to show only posts from a certain category, if I comment this out, it works.
> 
> is there a way I can make both to work, show only posts from one
> category on the frontpage and have working ec3 functions?
> 
> thanks for the help so far!

Hmm. I think the right way to do that is to have a home page that's different
from your 'blog' address. You need a special page for that query.

I've never done that, so I can't really guide you. It's quite a common
configuration though (I understand).

If you really need to do it in code you could try something like...

 global $wp_query;
 if(is_home() && empty($wp_query->query))
   query_posts("cat=1");

...I've not tested it, so good luck.

-Alex

--
> pulk wrote:
>> yes, it seems like it has something to do with my template. with the
>> default wordpress template it works.
>>
>> my front page shows the latest posts, yes.
>>
>> Alex Tingle wrote:
>>> Hi pulk,
>>>
>>> pulk wrote:
>>>> somehow all this ?ec3 functions seem to be broken for me, wich template
>>>> file is used for this output?
>>>>
>>>> see: http://tinyurl.com/5qtv2x
>>> It works on feeds, but not your main page:
>>>
>>> http://www.bsa.at/feed?ec3_before=today
>>>
>>> Try changing to the default template - does that make it work?
>>> Is your front page the 'blog'?
>>> Failing that, disable other plugins - does that help?
>>>
>>> Here's a clue. Your 'PRESSE' link goes to
>>>   http://www.bsa.at/?cat=25
>>> ...but when I navigate to that address, I'm *redirected* to
>>>   http://www.bsa.at/kategorie/presse/
>>>
>>> That makes me think it's canonical redirection that's causing your trouble. I
>>> don't understand why it should work on my test blog, but not on yours. Well,
>>> to turn off canonical redirection, put this at the bottom of eventcalendar3.php:
>>>
>>>   remove_action('template_redirect','redirect_canonical');
>>>
>>> Does that help?
>>>
>>> -Alex
>>>
>>> --
>>>
>>> pulk wrote:
>>>> somehow all this ?ec3 functions seem to be broken for me, wich template
>>>> file is used for this output?
>>>>
>>>> see: http://tinyurl.com/5qtv2x
>>>>
>>>> wp Version 2.6.3
>>>> Event Calendar 3.1.2
>>>>
>>>> Alex Tingle wrote:
>>>>> pulk wrote:
>>>>>> hi,
>>>>>> how can I make an archive with all past events. should work like a
>>>>>> normal category archive with newer/older entries but since it should be
>>>>>> ordered after the event date and not the post date, I think I need
>>>>>> something special here.
>>>>> Try:
>>>>>
>>>>> http://www.example.com/?ec3_before=today&order=asc
>>>>>
>>>>> -Alex

--
:: Let me solve your problems: http://www.firetree.net/consulting/
:: alex.tingle AT firetree.net  +44-7901-552763

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://penguin.firetree.net/pipermail/eventcalendar/attachments/20081030/d7bae361/signature.pgp


More information about the EventCalendar mailing list