title: saving checkbox values in meta box and displayed on front-end (category page not post/page) in wordpress
body: <p>I have create multiple checkbox in meta box using this code </p>
  
  <p>
  
  <pre><code>add_action ( 'edit_category_form_fields', 'extra_category_fields');
  
  function extra_category_fields( $tag ) {
      $t_id = $tag-&gt;term_id;
      $cat_meta = get_option( "category_$t_id");
      ?&gt;
  &lt;tr class="form-field"&gt;
      &lt;th scope="row" valign="top"&gt;&lt;label for="extra1"&gt;&lt;?php _e('extra field'); ?&gt;&lt;/label&gt;&lt;/th&gt;
      &lt;td&gt;
          &lt;input type="text" name="Cat_meta[extra1]" id="Cat_meta[extra1]" size="25" style="width:60%;" value="&lt;?php echo $cat_meta['extra1'] ? $cat_meta['extra1'] : ''; ?&gt;"&gt;&lt;br /&gt;
          &lt;span class="description"&gt;&lt;?php _e('extra field'); ?&gt;&lt;/span&gt;
      &lt;/td&gt;
  &lt;/tr&gt;
  
  &lt;tr class="form-field"&gt;
      &lt;th scope="row" valign="top"&gt;&lt;label&gt;&lt;?php _e('extra field'); ?&gt;&lt;/label&gt;&lt;/th&gt;
      &lt;td&gt;
          &lt;input type="radio" name="radio" value="ongoing"  &lt;?php checked( 'ongoing', get_option('radio') ); ?&gt; &gt;
          &lt;label class="description" for="ongoing"&gt;ongoing&lt;/label&gt;&lt;br&gt;
          &lt;input type="radio" name="radio" value="complated"  &lt;?php checked( 'complated', get_option('radio') ); ?&gt; &gt;
          &lt;label class="description" for="complated"&gt;complated&lt;/label&gt;
      &lt;/td&gt;
  &lt;/tr&gt;
  
  &lt;tr class="form-field"&gt;
      &lt;th scope="row" valign="top"&gt;&lt;label&gt;&lt;?php _e('extra field'); ?&gt;&lt;/label&gt;&lt;/th&gt;
      &lt;td&gt;
          &lt;label class="checkbox-inline" for="1"&gt;
              &lt;input type="checkbox" name="checkbox" &lt;?php if( 'checkbox' == true ) { ?&gt;checked="checked"&lt;?php } ?&gt;&gt;Option 1&lt;/label&gt;
          &lt;label class="checkbox-inline" for="2"&gt;
              &lt;input type="checkbox" name="checkbox" &lt;?php if( 'checkbox' == true ) { ?&gt;checked="checked"&lt;?php } ?&gt;&gt;Option 2&lt;/label&gt;
          &lt;label class="checkbox-inline" for="3"&gt;
              &lt;input type="checkbox" name="checkbox"&lt;?php if( 'checkbox' == true ) { ?&gt;checked="checked"&lt;?php } ?&gt;&gt;Option 3&lt;/label&gt;
      &lt;/td&gt;
  &lt;/tr&gt;
  
  &lt;?php
  }
  add_action ( 'edit_category_form_fields', 'extra_category_fields');
  </code></pre>
  
  <p><strong>for saving:</strong></p>
  
  <pre><code>function save_extra_category_fileds( $term_id) {
      if ( isset( $_POST['Cat_meta'] ) ) {
          $t_id = $term_id;
          $cat_meta = get_option( "category_$t_id");
          $cat_keys = array_keys($_POST['Cat_meta']);
  
          foreach ($cat_keys as $key){
              if (isset($_POST['Cat_meta'][$key])){
                  $cat_meta[$key] = $_POST['Cat_meta'][$key];
              }
              if (isset($_POST['radio'])) {
                  update_option('radio', $_POST['radio']);
              }
              if (isset($_POST['checkbox'])); {
                  update_option('checkbox', $_POST['checkbox']); 
              }
          }
  
          update_option( "category_$t_id", $cat_meta );
      }
  }
  add_action ( 'edited_category', 'save_extra_category_fileds');
  </code></pre>
  
  <p>radio option working fine but when I check one of checkbox and refresh the page it goes back to unchecked.
  Category fields not same normal pages so I cant use update_post_meta or $post_id </p>
  
  <p>so plz help me in this ... thank you</p>