Thread Starter
Meez
(@meez)
So here is the code in 10 lines:
<?php
$year = isset($_POST['year']) ? $_POST['year'] : '';
for ($i=0; $i<5; $i++)
{
$time = strtotime("-".$i." year", time());
$date = date("Y", $time);
$sel = $date == $year ? ' articleYearsSelected ' : '';
$url = (!empty($_SERVER['HTTPS'])) ? "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] : "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
$url= 'http://www.humanconcern.nl/';
?>
<tr>
<td class="articleCell"><img src="/wp-content/themes/humenconcern/images/arrow.png" /></td>
<td class="articleYears articleCell<?php echo $sel;?>">
<a href="<?php echo $url;?><?php echo $date;?>"><?php echo $date; ?></a>
</td>
</tr>
<?php
}
?>
if u want to put that year then u have to put static
because year is create when post is created
according to poet it created year
Thread Starter
Meez
(@meez)
But now the menu is also generated by PHP:
$year = isset($_POST['year']) ? $_POST['year'] : '';
for ($i=0; $i<5; $i++)
Can you do something like when you click on ‘Prev >>’ button you get something like this:
$year = isset($_POST['year']) ? $_POST['year'] : '';
for ($i=5; $i<10; $i++)
Thanks alot
u have not put like that
y have to put static 2007 2008
Thread Starter
Meez
(@meez)
Ok but how do i link from the current field (menu/overview):
And i don’t understand because the situation now is not static, isn’t it?
2012
2011
2010
2009
2008
to >>
2007
2006
2005
2004
2003
With javascript? Because you stay on the same page. You only navigate to previous Year overview…
Thanks
i dont understood what u have to do