Title: Date in sidebar.php
Last modified: August 18, 2016

---

# Date in sidebar.php

 *  [mike008](https://wordpress.org/support/users/mike008/)
 * (@mike008)
 * [18 years, 11 months ago](https://wordpress.org/support/topic/date-in-sidebarphp/)
 * I need to find a way to display a string of text (in the format of a link) in
   sidebar.php based on the date (monthly). Kind of similar to a random quote generator,
   without the random. I would like to find a plugin or function that would do this.
 * Any help is greatly appreciated.
 * Thanks,
 * ~mIKE

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [jwurster](https://wordpress.org/support/users/jwurster/)
 * (@jwurster)
 * [18 years, 11 months ago](https://wordpress.org/support/topic/date-in-sidebarphp/#post-586685)
 * So, you want to have a text file which has a bunch of records each having a month
   and a link like: 7,[http://your.domain.com](http://your.domain.com).
 * Then you want to randomly read through it to pick a link when you are in that
   month. Does that sound like what you want?
 *  Thread Starter [mike008](https://wordpress.org/support/users/mike008/)
 * (@mike008)
 * [18 years, 11 months ago](https://wordpress.org/support/topic/date-in-sidebarphp/#post-586813)
 * Kind of, but not random. Basically I’m setting up a page for a friend and he 
   would like to have a link populate each month to a different pdf file.
 * I guess I’m just looking for a way to “Set it and forget it.” So in June it will
   populate the link to the June.pdf file, in July a link to July.pdf.
 * This way the only thing he would need to update are the pdf files each year and
   he wouldn’t need to update sidebar.php each month.
 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [18 years, 11 months ago](https://wordpress.org/support/topic/date-in-sidebarphp/#post-586821)
 * `<a href="http://mydomain.com/files/<?php echo date("F");?>.pdf" title="Download
   the pdf here"><?php echo date("F");?>.pdf</a>`
 * Put that in your sidebar today, it links to June.pdf next month, it will link
   to July.pdf

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Date in sidebar.php’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [whooami](https://wordpress.org/support/users/whooami/)
 * Last activity: [18 years, 11 months ago](https://wordpress.org/support/topic/date-in-sidebarphp/#post-586821)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
