Advanced Ads enables you to display or hide ads based on the age of a page or post. This feature can be necessary, for example, when you want to display your ads only on the newest posts.

If you apply this option, an ad will only show up on pages/posts that fulfill the given conditions. If you remove the Content Age condition, the ad will be again visible in all places.

To display an ad based on content age, go to the Display Conditions meta box and add the Content Age condition.

Displaying ads by content age
After adding the content age condition, you can set detailed limitations for it

You may set the Content Age condition to either “older than” or “younger than” a certain number of days. This can be an integer (e.g., 2) or a fractional number (e.g., 2.5). 

But be careful with leaving 0 here. For the “older than” option, this would allow an ad to be always displayed. And for the “younger than” setting, 0 days would mean that the ad is never visible.

A use case for targeting ads by content age

An example of a use case for the Content Age condition is displaying different ads on your website’s news articles depending on their publication date. If the content is relatively fresh, e.g., up to 5 days old, ad #1 should show up. Later this ad unit is to be replaced by ad #2.

To do this, set the following conditions for ad #1:

Displaying ads in content younger than a specific number of days

And define the conditions for ad #2 like this:

Displaying ads in content older than a specific number of days

If you want these ads to be displayed automatically based on the Content Age you set, you may add them to an ad group. Then assign this ad group to a particular placement on your news article pages or inject it manually.

In this way, Advanced Ads will automatically cease displaying ad #1 after the specified number of days and exchange it for ad #2.