Created
April 16, 2012 05:39
-
-
Save tiltos/2396514 to your computer and use it in GitHub Desktop.
WP: create flexslider HTML (with ACF Repeater)
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
<?php | |
$slides = get_field('slider'); | |
foreach( $slides as $slide) { | |
$markup = '<img src="'. $slide['image'] .'" alt="'. $slide['alternate'] .'" >'; | |
if( $slide['link']) { | |
$markup = '<a href="'. $slide['link'] .'">' . $markup . '</a>'; | |
} | |
$markup = '<li>' . $markup . '</li>'; | |
echo $markup; | |
}; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment