From 475970235bb001699e421ff249248c1475037e05 Mon Sep 17 00:00:00 2001 From: Joshua Roy Date: Fri, 18 Aug 2017 07:53:33 -0400 Subject: [PATCH] Fixing sharelines --- content-single.php | 2 +- functions.php | 17 ++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/content-single.php b/content-single.php index 249ee55..7a0e689 100644 --- a/content-single.php +++ b/content-single.php @@ -26,7 +26,7 @@
ID, 'enable_sharelines', true)){ + if(get_post_meta( $post->ID, 'enable_sharelines', true) != 'disabled'){ ?>
array ( array ( 'key' => 'field_598483a2ea9d9', - 'label' => 'Enable Sharelines', + 'label' => 'Sharelines', 'name' => 'enable_sharelines', - 'type' => 'checkbox', + 'type' => 'radio', 'instructions' => '', 'required' => 0, 'conditional_logic' => 0, @@ -342,15 +342,14 @@ acf_add_local_field_group(array ( 'id' => '', ), 'choices' => array ( - 'Enable Sharelines' => 'Enable Sharelines', - ), - 'allow_custom' => 0, - 'save_custom' => 0, - 'default_value' => array ( - 0 => 'Enable Sharelines', + 'enabled' => 'Enabled', + 'disabled' => 'Disabled', ), + 'allow_null' => 0, + 'other_choice' => 0, + 'save_other_choice' => 0, + 'default_value' => 'enabled', 'layout' => 'vertical', - 'toggle' => 0, 'return_format' => 'value', ), array (