Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-05-01 23:23:10

nemozob
Member
Registered: 2008-04-15
Posts: 36

If article posting date is 30 days or younger: how to test this?

I’m trying to indicate that an article is new or updated by testing to see how old the posting is. So, something like:
if ( posted_date <= 30 days ) { do something here
}

or like this:
<txp:if_posted offset=“30”>class=“fresh”</txp:if_posted>

I realize these won’t work but it’s what I imagine it might look like. I tried out a few plug-ins but I haven’t be able to get this to work the way I want

Offline

#2 2008-05-01 23:29:46

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: If article posting date is 30 days or younger: how to test this?

plugin :)

Offline

#3 2008-05-01 23:33:39

nemozob
Member
Registered: 2008-04-15
Posts: 36

Re: If article posting date is 30 days or younger: how to test this?

Wow, that was fast! Thank you, this appears to be working.

Offline

Board footer

Powered by FluxBB