tags:

views:

20

answers:

1

In my wordpress home page, i am displaying the archives using the function

wp_get_archives('type=weekly&format=html')

and it outputs like

* July 19, 2010–July 25, 2010
* July 12, 2010–July 18, 2010

ie starting from monday to next monday.How can i change this from saturday to next saturday

A: 

This depends on the start_of_week option, which you can set under Settings > General > Week Starts On. If you don't want to change this, you could intercept the call to get_option to return something different.

add_filter('pre_option_start_of_week', 'start_once_on_saturday');
function start_once_on_saturday()
{
   // Make sure we only do this once
   remove_filter('pre_option_start_of_week', 'start_once_on_saturday');
   return 6;
}
wp_get_archives('type=weekly&format=html');
Jan Fabry