Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Sidebars & Widgets (http://forum.bytesforall.com/forumdisplay.php?f=14)
-   -   Need gallery widget to show images on a schedule, with links (http://forum.bytesforall.com/showthread.php?t=2023)

paulae Jun 11, 2009 07:46 PM

Need gallery widget to show images on a schedule, with links
 
This is hard to explain.

I need to be able to show an image in a sidebar, which links to an outside site when clicked. I need to show a different image each day of the month, linking to a different site for each image.

At the moment, I'm using an iframe which shows a particular date of the calendar, and in that calendar are 30 or 31 different images as the data for each date. It's a cumbersome solution, and I'd rather use a Wordpress method instead.

Flynn Jun 18, 2009 04:16 AM

You could use a PHP widget
PHP Code:

<?php
$current_month 
date('n');
switch (
$current_month) {
   case 
1: echo '<a href="link1"><img src="/path/to/image1.jpg" /></a>'; break;
   case 
2: echo '<a href="link2"><img src="/path/to/image2.jpg" /></a>'; break;
   case 
3: echo '<a href="link3"><img src="/path/to/image3.jpg" /></a>'; break;
   case 
4: echo '<a href="link4"><img src="/path/to/image4.jpg" /></a>'; break;
   case 
5: echo '<a href="link5"><img src="/path/to/image5.jpg" /></a>'; break;
   case 
6: echo '<a href="link6"><img src="/path/to/image6.jpg" /></a>'; break;
   case 
7: echo '<a href="link7"><img src="/path/to/image7.jpg" /></a>'; break;
   case 
8: echo '<a href="link8"><img src="/path/to/image8.jpg" /></a>'; break;
   case 
9: echo '<a href="link9"><img src="/path/to/image9.jpg" /></a>'; break;
   case 
10: echo '<a href="link10"><img src="/path/to/image10.jpg" /></a>'; break;
   case 
11: echo '<a href="link11"><img src="/path/to/image11.jpg" /></a>'; break;
   case 
12: echo '<a href="link12"><img src="/path/to/image12.jpg" /></a>'
}
?>



All times are GMT -6. The time now is 01:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.