Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function get_terms_grades_dropdown($taxonomies, $args)
- {
- global $search_values;
- $myterms = get_terms($taxonomies, $args);
- $output = "";
- foreach ($myterms as $term) {
- $root_url = get_bloginfo('url');
- $term_taxonomy = $term->grades;
- $term_slug = $term->slug;
- $term_name = $term->name;
- $value = $term->term_id;
- if ($search_values['grades'] == $term->slug) {
- $selected = "selected='selected'";
- } else {
- $selected = '';
- }
- $output .= "<option value='" . $value . "' " . $selected . ">" . $term_name . "</option>";
- }
- return $output;
- }
- if ($search_values['grades'] == $term->slug) {
- $selected = "selected='selected'";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement