Created
August 4, 2011 12:13
-
-
Save mattboon/1125044 to your computer and use it in GitHub Desktop.
Featured Slider Loop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="featured"> | |
<ul class="tabs"> | |
<?php for ($i=1;$i<6;$i++): ?> | |
<?php | |
${"tab_".$i} = get_option('panel_tab_'.$i); | |
${"summary_".$i} = get_option('panel_summary_'.$i); | |
${"text_".$i} = get_option('panel_content_'.$i); | |
${"img_".$i} = get_option('panel_img_'.$i); | |
${"link_".$i} = get_option('panel_link_'.$i); | |
?> | |
<li class="link-<?= $i; ?>"> | |
<a href="<?= get_permalink(${"link_".$i}); ?>"> | |
<?= ${"tab_".$i} ?> | |
<br /> | |
<em> | |
<?= ${"summary_".$i}; ?> | |
</em> | |
</a> | |
</li> | |
<?php endfor; ?> | |
</ul> | |
<?php for ($i=1;$i<6;$i++): ?> | |
<div class="link-<?= $i; ?>"> | |
<?= ${"text_".$i} ? ${"text_".$i} : '' ?> | |
<?php if(${"link_".$i}): ?> | |
<a class="more" href="<?= get_permalink(${"link_".$i}); ?>"> | |
Find out more | |
</a> | |
<?php endif; ?> | |
<?php if(${"img_".$i}): ?> | |
<img src="<?= ${"img_".$i} ?>" alt="<?= ${"tab_".$i} ?>" /> | |
<?php endif; ?> | |
</div> | |
<?php endfor; ?> | |
</div><!-- #featured --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment