Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2019-04-05 13:56:26

ibadullah
Member
From: Kabul, Afghanistan
Registered: 2017-09-16
Posts: 49

how to filter yesterday's articles ?

How to filter articles by specific date ?
for example: yesterday articles
I’m trying the following code:

<txp:article_custom section="english">
   <h3><txp:title /></h3>
</txp:article_custom>

Offline

#2 2019-04-05 14:11:47

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

Re: how to filter yesterday's articles ?

Hi ibadullah,
Does the documentation help? Search for month="yyyy"/"yyyy-mm"/"yyyy-mm-dd"/"date", or are you looking for something more specific?


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

Offline

#3 2019-04-11 18:23:44

etc
Developer
Registered: 2010-11-11
Posts: 5,053
Website GitHub

Re: how to filter yesterday's articles ?

ibadullah wrote #317514:

for example: yesterday articles

Something like this should work (untested):

<txp:article_custom month="yesterday" time="+1 day">
   <h3><txp:title /></h3>
</txp:article_custom>

Offline

Board footer

Powered by FluxBB