@kkokoruz Bummer didn’t work for me, must be something on my end.
But now I know how multiple meta queries work, which I need. Need to figure out this issue first.
Thanks.
I too have this issue, did you ever find a solution?
Thanks again John
Cool stuff. Thanks for quick response and explanation.
I knew there was a reason no one asked. Simple php logic. Its amazing how far am getting with my lack of skill. Thanks for getting that much farther.
Both solutions taught me something. What does that “.” after $content before the “=” do?
Thanks again.
My code is a little more complex. I tried to simplify code to get the point across.
<?php
echo '<table>';
if( get_field('product_watts') ) {
echo '<tr><td>' . '<strong>Wattage: </strong></td><td>';
while ( have_rows('product_watts') ) : the_row();
$array1[] = get_sub_field('watts') .'w';
endwhile;
$watts = implode(', ', $array1);
echo $watts .'</td></tr>';
}
if( get_field('product_watt_replacement') ) {
echo '<tr><td>' . '<strong>Wattage Replacement: </strong></td><td>';
while ( have_rows('product_watt_replacement') ) : the_row();
$array2[] = get_sub_field('watt_replacement') .'w';
endwhile;
$watt = implode(', ', $array2);
echo $watt .'</td></tr>';
}
echo '</table>';
?>
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.