language: PHP
licence: Other
If Posts within 7 days
<?php
$week = date('W'); $year = date('Y');
$ageunix = get_the_time('U');
$days_old_in_seconds = ((time() - $ageunix));
$days_old = (($days_old_in_seconds/86400));
?>
<?php $current_week = date('W'); ?>
<?php $current_month = date('m'); ?>
<?php $current_year = date('Y'); ?>
<?php if ($days_old > 7) : ?>
<?php include("archiveposts.php"); ?>
<?php else : ?>
<?php include("currentposts.php"); ?>
<?php endif; ?>



library
wordpress (20)