Forums

how do you display a weekly archive??? (2 posts)

  1. scottroeder
    Member
    Posted 2 years ago #

    I'm using a weekly archive on my blog for a newspaper. When I click on a category it shows the whole archive, but I only want it to show the post for that category for the current week. How can I do this?

    Also, on my archives template, I would like it to say "Week of: 'start of the week'-'end of the week" Is there a code that calls up the date for the start and end of the week?

    A very similar question was asked before, but was never answered.

    Thanks.

  2. MichaelH
    Volunteer
    Posted 2 years ago #

    When I click on a category it shows the whole archive, but I only want it to show the post for that category for the current week

    Modify your Category Template to query just the posts for the current week. See query_posts() time parameters.

    I would like it to say "Week of: 'start of the week'-'end of the week" Is there a code that calls up the date for the start and end of the week?

    The template tag, wp_get_archives(), has a type=weekly argument that when used displays a weeks begin/end date so you might look at the function in wp-includes/general-template.php for ideas.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags