Get customize categories in wordpress

The following example will show the categories with checkbox

<?php
$args=array(
‘child_of’ => ‘1’,
‘hide_empty’ => ‘0’
);
$categories = get_categories($args);
foreach($categories as $key => $value){
?>
<label><input name=”escorts_category[]” value=”<?php echo $categories[$key]->cat_ID; ?>” type=”checkbox”> <?php echo $categories[$key]->name; ?></label><br />
<?php } ?>

For more information click here


To seek challenging roles and to achieve excellence in the field of Open Source Web Technology with a profound spirit of commitment and dedication.

Share This Post

Related Articles

© 2017 Sumit Bansal. All rights reserved. Site Admin · Entries RSS · Comments RSS
Powered by WordPress · Designed by Theme Junkie