WordPress.org

Ready to get started?Download WordPress

Forums

How to show posts of current week on a page? (2 posts)

  1. seville76
    Member
    Posted 6 years ago #

    I looked everywhere and I also tried out the CQS plugin,

    but nowhere is a solution. :(

    I would like to show on a specific page just the posts of the current week. What code do I have to put on my page to make this happen?

    I'm using the Exec-PHP plugin. So I would be able to use PHP Code inside the page.

    The page should contain the articles in full post or excerpt. Not listed as an archive with just a date.

    I greatly appreciate your help.

  2. moshu
    Member
    Posted 6 years ago #

    The problem, as always, is with the Page idea.

    Out of the box WP offers this:
    <?php wp_get_archives('type=weekly&limit=1'); ?>
    and (today) it creates a link like this:
    March 10, 2008–March 16, 2008
    Next, clicking on that link you have displayed all the posts for the current week.
    Whether it's full text or excerpt... it is entirely up to your template file(s).

Topic Closed

This topic has been closed to new replies.

About this Topic