Plugin Author
hunk
(@hunk)
<?php
$fotos = get_order_field(‘fotos_fotos’);
if( !empty($fotos)){
foreach($fotos as $foto){
//more code
}
} else {
print ”;
}
?>
thank you! but shows the code that should be empty. you know why?
<a href="" rel="lightbox[usb]"></a>
Plugin Author
hunk
(@hunk)
what return
<?php
$fotos = get_order_field(‘fotos_fotos’);
pr($fotos);
foreach($fotos as $foto){
pr(get(‘fotos_fotos’,1,$foto) ));
}
I tried the code but still doing the same. But with a gray background and code.
<div class="flexslider">
<ul class="slides"><li><?php
if ( has_post_thumbnail()) {
$large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large');
echo '<a href="' . $large_image_url[0] . '" rel="lightbox[usb]" . title="' . the_title_attribute('echo=0') . '" >';
the_post_thumbnail('medium');
echo '</a>';
}
?></li>
<?php
$fotos = get_order_field('fotos_fotos');
pr($fotos);
foreach($fotos as $foto){
// el segundo parametro de la función get y get_image es el indice del grupo a mostrar
print '<li>';
printf('<a href="%s" rel="lightbox[usb]">', pr(get('fotos_fotos',1,$foto) ));
printf('%s', get_image('fotos_fotos',1,$foto) );
print '</a>';
print '</li>';
}
?>
</ul>
</div>
Plugin Author
hunk
(@hunk)
the pr function is for show the content of var
ok! but there is no picture and remains
<pre>Array
(
[0] => 1
)
</pre>
I just want to show the post thumbail if no more photos in image custom fields…
Plugin Author
hunk
(@hunk)
And this post does not have any custom field, correctly?
have a group with a repeating field image. The slide is formed by the featured image and the repeating field.
alguien tiene una solucion?
anyone have a solution?
Plugin Author
hunk
(@hunk)
the get_order_field function return having 1 field, but get return empty, right?
true, and upload the images that I want, 1, 2, 3 etc. .. 0
Plugin Author
hunk
(@hunk)
you can write this, what return
<?php
$fotos = get_field(‘fotos_fotos’);
pr($fotos);
?>;
Plugin Author
hunk
(@hunk)
it is strange that the get_order_field function returns having 1 field, but the get function returns no information, you could have a backup of the DB