Answer the question
In order to leave comments, you need to log in
How to change search dropdown to checkbox?
Tell me how to change the drop-down search so that it becomes a horizontal checkbox in a row
<div class="row">
<div class="col-md-3 col-sm-3">
<div class="form-group">
<label for="search_type"><?php _e('TYPE:',CMS_NAME); ?></label>
<?php
$args = array(
'show_option_none' => 'ALL',
'name' => 'search_type',
'taxonomy' => 'property-type',
'hide_empty' => false,
'orderby' => 'name',
'order' => 'ASC',
);
?>
<?php wp_dropdown_categories($args);?>
</div>
Answer the question
In order to leave comments, you need to log in
Use another function and wrap it in the appropriate input, something like this
$categories = get_categories( $args );
foreach ($categories as $category) {
$option = <input type="checkbox" name="option1" value="a1" checked>';
$option .= $category->cat_name;
echo $option;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question