is there php code for next and previous year,month,day link in archive page i just need something like that
<-previous [year] next->
<-previous [month] next->
<-previous [day] next->
im creating a calendar and need those .
is there php code for next and previous year,month,day link in archive page i just need something like that
<-previous [year] next->
<-previous [month] next->
<-previous [day] next->
im creating a calendar and need those .
Share Improve this question asked Jun 15, 2015 at 8:56 Mouner MostafaMouner Mostafa 378 bronze badges 3- Have you tried anything already? – Krzysiek Dróżdż Commented Jun 15, 2015 at 9:12
- Unfortunately no – Mouner Mostafa Commented Jun 15, 2015 at 9:22
- 1 Like your honesty. Just an idea, why don't you use the build in calendar widget as base for yours – Pieter Goosen Commented Jun 15, 2015 at 11:01
1 Answer
Reset to default -1thank u all i just did a simple code to get what i want
<?php
$prevyear = date('2150') - 0001;
$nextyear = date('2150') + 0001;
$prevmonth = date('01') - 01;
$nextmonth = date('01') + 01;
echo echo get_year_link($prevyear)."<br />".get_year_link($nextyear)."<br />".get_year_link($prevmonth)."<br />".get_year_link($nextmonth)."<br />";
?>