Determine if post/page has fields
-
Hi,
I display some fields that are wrapped in a
div
container.
I thought when using this condition, the container with fields is only displayed if present:$fields = get_field_objects();
if ( $fields ) {
<div class="fields-container">
// my fields
</div>
}But the
$fields
array seems to be not empty, even when post/page has no fields.
So what’s the best way to determine if post/page has fields?Guido
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.