Wordpress Select categories option panel themes


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <select class="aselect" id="<?php echo $value['id']; ?>" name="<?php echo $value['id']; ?>">
  2. <?php
  3. global $options;
  4. foreach ($options as $value) {
  5. if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] );
  6. }
  7. }
  8. $cats = get_categories('hide_empty=0'); foreach($cats as $cat) { ?>
  9. <option value="<?php echo $cat->cat_ID; ?>"<?php selected($tt_catbox_1, $cat->cat_ID); ?>><?php echo $cat->cat_name; ?></option>
  10. <?php } ?>
  11. </select>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.