Conditional Display logic for custom fields
-
How do I display a widget on custom post pages where the value of a custom field dictates whether to display or not:
$customfield= get_post_meta( $post->ID, ‘_unavailable’, true );
if ($customfield === ‘yes’);
The above results in the widget not displaying at all.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- You must be logged in to reply to this topic.