logo
Ask your WordPress questions! Pay money and get answers fast! (more info)

This is an old version of this answer!

Return to the current answer
For code efficiency, you should always create a if statement similar to how Cosmin Popovici has it or else you will get an indexing error when the value of your custom fields is empty.

<?php
$args = array(
"post_type" = "store",
"posts_per_page" = 25
);
query_posts($args);
while ( have_posts() ) : the_post();
$custom_field = get_post_meta($post->ID, "_simple_fields_fieldGroupID_1_fieldID_8_numInSet_0", true);
if(!empty($custom_field)) {
// do your code here
}
endwhile;
?>

Chris Bavota | 01/02/11 at 10:46am

This is an old version of this answer!

Return to the current answer