teSo I’m trying to output a text and an image field from a duplicate group through Magic Fields, the text field shows the different duplicates but the image field keeps displaying the url to the first image repeatedly. Can anyone tell me what I’m doing wrong?
<?php
$articlephotos="&w=728&h=560&q=95&zc=1&iar=0&far=0";
?>
<?php $myContents = get_group('contents'); // use the Custom Group name
foreach($myContents as $contents){ ?>
<?php if( get('contents_text', true) ) { ?>
<div class="contents"><?php echo $contents['contents_text'][1]; ?></div>
<?php } ?>
<?php if( get('contents_image', true) ) { ?>
<div class="post_container" style="padding-bottom: 24px;">
<div class="photo_outside">
<div class="photo_inside">
<img src="<?php bloginfo('stylesheet_directory'); ?>/phpThumb/phpThumb.php?src=<?php echo get_image('contents_image',$contents,$contents,0); ?><?php echo $articlephotos ?>" title="<?php echo get_the_title($ID) ?>" alt="<?php echo get_the_title($ID) ?>">
</div><!-- end photos_inside -->
</div><!-- end photos_outside -->
</div>
<?php } ?>
<?php } ?>
Thanks in advance!
EDIT: Var Dump outputs:
array(2) { [1]=> array(2) { [“contents_text”]=> array(1) { [1]=>
string(1085) “Text 01
” } [“contents_image”]=> array(1) { [1]=> array(2) { [“original”]=>
string(122) “http://www.mysite.com/image01.jpg” [“thumb”]=>
string(122) “http://www.mysite.com/image01.jpg” } } } [2]=> array(2) {
[“contents_text”]=> array(1) { [1]=> string(1380) “Text 02
” } [“contents_image”]=> array(1) { [1]=> array(2) { [“original”]=>
string(119) “http://www.mysite.com/image01.jpg” [“thumb”]=>
string(119) “http://www.mysite.com/image01.jpg” } } } }
I abbreviated the content of the texts and the image urls.
I found the solution from the plug-in’s group, thanks for your help!