最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

calendar - next and previous year month and day for archive page

programmeradmin1浏览0评论

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
Add a comment  | 

1 Answer 1

Reset to default -1

thank 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 />";
?>
发布评论

评论列表(0)

  1. 暂无评论