0

I'm looking to create individual archives for each category of my website, but want to them to break into weeks. Check out the linked image (can't embed images as a new user?):

https://i.stack.imgur.com/ynHWb.png

I'm finding real difficulties here: 1) Breaking archives out weekly, 2) Adding the Date at the Top 3) Listing each post as a list item with some HTML in it…

Any help would be tremendously appreciated!

2 Answers 2

1
<?php $args = array(
    'type'            => 'weekly',
    'limit'           => ,
    'format'          => 'html', 
    'before'          => ,
    'after'           => ,
    'show_post_count' => false,
    'echo'            => 1 ); ?>
<?php wp_get_archives( $args ); ?>

See this Codex article: wp_get_archives

1
  • check out the linked image. I think @Ben is looking to break up the posts by week, rather than just display links to weekly archives. May 16, 2011 at 22:02
0

I use the filter widget_archives_dropdown_args to limit number of months in the default monthly archive widget - you can modify it to change the type to weekly.

function my_limit_archives( $args ) {    
    $args[ 'type' ] = 'weekly'; 
    return $args;
}
add_filter(
    'widget_archives_dropdown_args',
    'my_limit_archives'
);  
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.