[Plugin: Widget Logic] use custom field data with widget logic?
-
I am using the following code to dynamically display a city based on a custom field on a page. How do I configure this same functionality in widget logic? I see where I can configure a page and category but can I use custom field?
<?php $value = get_post_meta($post->ID, 'locations', true); if($value == 'sarasota') {echo 'Sarasota';} elseif($value == 'bradenton') { echo 'Bradenton'; } elseif($value == 'naples') {echo 'Naples';} else {echo 'Fort Myers';} ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘[Plugin: Widget Logic] use custom field data with widget logic?’ is closed to new replies.