Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-05-26 17:20:21

ashground
Member
From: Vancouver, Canada
Registered: 2005-01-07
Posts: 63
Website

Limit articles to only show the last two years?

I’ve been running my blog since 2002, and I’d like to limit my archive to only show articles from the last two years (the old stuff is… well, just too embarrassing). I know articles can be set to expire, but it’s on a per-article basis. I know something like a plugin that says “Show only articles from [the last two years]” would be too good to be true, but odds are good that someone’s figured this out already. Does anyone have any ideas?

Offline

#2 2011-05-27 05:42:13

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,257
Website GitHub Mastodon Twitter

Re: Limit articles to only show the last two years?

with article_custom you can limit articles by date

Maybe someone who understands php should be able to help you more but something like <txp:article_custom author="Parkling" limit="20" month='<txp:php>echo date('Y'); </txp:php>'><txp:permlink><txp:title /></txp:permlink></txp:article_custom> would/should only list articles from the current year


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

Board footer

Powered by FluxBB