Forums

show at most n days (9 posts)

  1. jon1234444
    Member
    Posted 7 years ago #

    I've searched the forums and found mentions of this, but no definite answer. I have the reading options set to "show at most 7 days" and on the main page it shows the posts from the last 7 days of posts, even if those days were weeks ago. I understand that this is how it's supposed to work.

    however, I would like it to display only the posts from the last week, only the last 7 days. so if I've only posted once in the last week, just one post is showing, not 7 posts from weeks ago. does anyone know of a plugin or hack or something to get around this?

    thanks!

  2. oriecat
    Member
    Posted 7 years ago #

    nevermind :)

  3. jon1234444
    Member
    Posted 7 years ago #

    nevermind...? I still mind =P

  4. TechGnome
    Moderator
    Posted 7 years ago #

    In your options... set it to show posts for 7 days.....

    I'm sure it's been moved, but in 1.2 it was under Options -> Reading -> Front Page -> Show the most recent: Set the nuimber to and the selection to days.

    In 1.5 it might be worded differently, but it should still be in the Readin options sections.

    Tg

  5. jon1234444
    Member
    Posted 7 years ago #

    that is what it is set at right now, the problem is the definition of 7 days isn't the past week, it is the last 7 days that there are posts (which could go back weeks)

  6. jon1234444
    Member
    Posted 7 years ago #

    this question is unanswered here as well:
    http://wordpress.org/support/topic.php?id=26508

    "As far as I remember, WordPress has only (ever) displayed # days for any days one or more posts are available for. So if you had 7 days worth of posts over a 14 day period, it would still count as 7 days worth (i.e. the last 7 days in which posts exist)."

    I want it to display as many posts that exist that were published in just the last week. understand?

  7. Kafkaesqui
    Moderator
    Posted 7 years ago #

    The question is unanswered? Your quote (of my words) was the answer!

    So if you haven't posted in 8 days, you want a blank page? Anyway, I discussed one way to go about setting the home page to only display the last month's worth of posts here:

    http://wordpress.org/support/topic.php?id=21658

    Anything beyond that (i.e. a week's worth) would require some real hacking. For an idea of what it might take, you could look at the internals for get_archives() in the wp-includes/template-functions-general.php file, and see how it goes about displaying weekly links.

  8. jon1234444
    Member
    Posted 7 years ago #

    "So if you haven't posted in 8 days, you want a blank page?"

    basically, yes =]

    oh well, if there's not a quick fix I guess I can do without. thanks for the help.

  9. Ryan Boren
    WordPress Dev
    Posted 7 years ago #

    jon1234444, 1.2 paged by days in the manner you describe, and it was widely considered broken since empty pages could result. Thus the behavior was changed in 1.5. If you would like to restore the 1.2 behavior, a plugin that hooks to the posts_where_paged filter would be required.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.