Meez
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
Forum: Fixing WordPress
In reply to: Archive prev / next yearOk 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
2008to >>
2007
2006
2005
2004
2003With javascript? Because you stay on the same page. You only navigate to previous Year overview…
Thanks
Forum: Fixing WordPress
In reply to: Archive prev / next yearBut 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
Forum: Fixing WordPress
In reply to: Archive prev / next yearSo 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 } ?>
Viewing 3 replies - 1 through 3 (of 3 total)