Hello,
I would like to use the limit parameter. I have set up an image_advanced meta. The code snippet which retrieves the value is this:
<?php $metaBackgroundImage = rwmb_meta( 'socialityandydote_background_image' );
if ( !empty( $metaBackgroundImage) ) {
foreach ( $metaBackgroundImage as $image ) { ?>
<section style="background-image: url(<?php echo $image['full_url']; ?>); background-position: 0 0; background-repeat: repeat;" id="main">
<?php break; } } else { ?>
<section id="main">
<?php } ?>
My point is that I do not want to use a for each loop as I want only one image to be retrieved from this meta. For example if I used something like rwmb_meta( 'socialityandydote_background_image', 'limit=1' )
, will this prevent from using a loop?
Thank you in advance.