• 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)
  • 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.

    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

    (@mike008)

    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.

    <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.