09/07/2015 at 4:58 pm
#345882
Participant
Hello Steven,
Already you solved the links into categories. Then the code (class.entry-output.php)
if ( empty( $atts['separator'] ) ) {
$atts['list'] === 'unordered' ? $out .= '<ul class="cn_category_list">' : $out .= '';
foreach ( $categories as $category ) {
$out .= 'term_id . '"><li class="cn_category" id="cn_category_' . $category->term_id . '">' . $category->name . '';
}
$atts['list'] === 'unordered' ? $out .= '' : $out .= '
';
} else {
$i = 1;
foreach ( $categories as $category ) {
$out .= 'term_id . '">term_id . '">' . $category->name . ( count( $categories ) > $i++ && ! empty( $atts['separator'] ) ? $atts['separator'] : '' ) . '';
}
}
$out .= $atts['after'];
return $this->echoOrReturn( $atts['return'], $out );
}
I managed to make me a checkbox to filter by state, but need to make a CheckboxGroup to select more than one state. Could you help, please?
My code:
array(
'name' => 'States Group',
'show_label' => TRUE, // Show field label
'desc' => 'field description',
'id' => 'address[::FIELD::][state]',
'type' => 'checkboxgroup',
'options' => array(
'Barcelona' => 'Barcelona',
'Madrid' => 'Madrid',
'Sevilla' => 'Sevilla',
),
Because it doesn’t work?
Thank you very much!
