<p>Hadn't thought about using simple <code>if</code> logic here in the template</p>

<pre><code>{% if entry.postDate &lt;= now|date_modify('-90 days') %}
    {% redirect 'jobs/expired' %}
{% endif %}
</code></pre>

CC BY-SA 3.0
2015-06-24T20:45:30.293Z
2015-06-25T18:39:51.900Z
2015-06-25T18:39:51.900Z
Steven Grant
<p>For SEO purposes, it might actually be better to keep the listing live, but clearly mark it as expired.</p>

<p>What I ended up doing was just having an additional field in my section that defined my own internal status of the entry, and then adjusted the display based on that.</p>

<p>If simple expiration is enough for you, then it probably doesn't matter, though.</p>

CC BY-SA 3.0
2015-06-25T18:57:28.460Z
2015-06-25T18:57:28.460Z
andrew.welch
<p>I have a job board running on Craft. We're "auto expiring" the posts from listing pages based on the post date.</p>

<p>However, I want to redirect the actual entry page to either a 'this job has expired' page in cases where some one is linking from an external site.</p>

<p>Is that possible? </p>

<templating><entries><error-templates><expired>
Redirect 'expired' or deleted entries
# Redirect 'expired' or deleted entries

(Asked by: username_0 on 2015-06-24)

I have a job board running on Craft. We're "auto expiring" the posts from listing pages based on the post date.

However, I want to redirect the actual entry page to either a 'this job has expired' page in cases where some one is linking from an external site.

Is that possible?

**Tags:** templating, entries, error-templates, expired

---

## 2 answers

### Answer by username_0 on 2015-06-24. Score: 3

Hadn't thought about using simple if logic here in the template
{% if entry.postDate <= now|date_modify('-90 days') %}
    {% redirect 'jobs/expired' %}
{% endif %}


---

### Answer by username_1 on 2015-06-25. Score: 2

For SEO purposes, it might actually be better to keep the listing live, but clearly mark it as expired.

What I ended up doing was just having an additional field in my section that defined my own internal status of the entry, and then adjusted the display based on that.

If simple expiration is enough for you, then it probably doesn't matter, though.


---

