[wp-hackers] unsubscribers
Luis Villarino
lvillarino at gmail.com
Fri Dec 26 18:05:26 GMT 2008
On Fri, Dec 26, 2008 at 9:53 AM, RePost <repost_08 at yahoo.com> wrote:
> Harish Narayanan wrote:
>
>> RePost wrote:
>>
>>
>>
>>> Does WordPress provide a tag that will let me display the date on top of
>>> my archives pages?
>>>
>>> I'd like to display "Archive: December 26, 2008" or "Archive: December
>>> 2008," where the tag would provide the date.
>>>
>>>
>>
>> There might be a simpler (as in more modern) way, but I use a
>> combination of is_{something}() followed by a suitable call to
>> the_time() to set my title.
>>
>> For e.g.,
>>
>>
>> <?php /* If this is a daily archive */ } if (is_day()) { ?>
>> <h2 class="pagetitle">Archive for <?php the_time('F jS, Y'); ?></h2>
>>
>> <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
>> <h2 class="pagetitle">Archive for <?php the_time('F, Y'); ?></h2>
>>
>> <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
>> <h2 class="pagetitle">Archive for <?php the_time('Y'); ?></h2>
>>
>>
> Thanks, Harish.
>
> This returns an "unexpected '}' error" for the first line.
>
> Wish I could do more with php than write includes. Do you see an error
> here?
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
--
osCommerce Expert
www.ezosc.com
More information about the wp-hackers
mailing list