SPIP

[ar] [ast] [bg] [br] [ca] [co] [cpf] [cs] [da] [de] [en] [eo] [es] [eu] [fa] [fon] [fr] [gl] [id] [it] [ja] [lb] [nl] [oc] [pl] [pt] [ro] [ru] [sk] [sv] [tr] [uk] [vi] [zh] Espace de traduction

Download
Home > English documentation > Webmasters > A few examples of loops > Not displaying articles that were published over a year ago

Not displaying articles that were published over a year ago

June 2010

All the versions of this article:


This can be done by using the "age" criteria, which is the age of the article as calculated by the number of days since the article was published to the public site.

To retain the articles that are less than a year old in the current section, we use the criteria: {age < 365} :

Alternatively, to take consideration of the article’s age in relation to its date of "earlier publication" rather than the date that it was put on-line, you will need to use the "age_redac" criteria instead of "age". The age is indicated as a number of days. See: "Managing Dates".

Note that this kind of filtering is possible with all types of data that have an associated date (news items, forums...).


Show the template of this page Site powered by SPIP | Translation area | Private area