Viewing 1 replies (of 1 total)
  • I think this will do what you want:

    <?php
    $mykey_values = get_post_custom_values('wpcf-in-recipe');
    foreach ( $mykey_values as $key => $value ) {
       echo "<li><span>$value</span></li>";
       if ( ++$my_counter > 4 ) break;
    }
    ?>
Viewing 1 replies (of 1 total)
  • The topic ‘How to loop max 5 post custom values?’ is closed to new replies.