Hi William, sorry for the late reply!
About querying for posts by published date, there’s an attribute called publish_date
.
<Loop type=post count=5 category=notices publish_date="8 weeks ago" publish_compare="after">
I think the attribute publish_compare
is necessary, because without it the query would search for posts published exactly 8 weeks ago, on that specific day.
Maybe the Loop
tag should accept an attribute called after
, like in CCS, as a short way to express the publish date query.
About passing the result of Date
tag in a tag attribute, there’s a special syntax which replaces <>
with {}
.
<If check="{Field publish_date}" after="{Date format=timestamp}-8 weeks{/Date}">
…Actually, for the above condition, there’s a better way. There’s a field
attribute to compare a field value, and the after
attribute converts to timestamp already.
<If field="publish_date" after="-8 weeks">
These date conditionals are described here:
But for efficiency and performance, it’s better to query using Loop
tag attributes instead of filtering with If
tag.