get_terms not working when child_of is used

I got it solved on my own so, wanted to answer my own question. in options table the results are cached, so I queried it and delete that. SELECT * FROM `wp_options` WHERE `option_name` like ‘%department%’ department is my taxonomy name here. You can check the function _get_term_hierarchy in taxonomy.php in wp-includes folder.

Get count for all terms inside a parent term

I don’t know why that code didn’t work for you. I copy that code and it work exactly as I expected. You should double check your case, did you unset $args variable before, or you can use another name ($agrs2 for example). Another problem in you question is: if pad_counts doesn’t work, you will get … Read more

taxonomy terms are not populating select tag options

I believe this has more to do with the ternary operator being used inside of string concatenation. I would eliminate this issue by relying on a classic if statement, but WordPress provides a helpful function selected, giving us: $terms = get_terms( ‘department’ ); if ( ! empty( $terms ) && ! is_wp_error( $terms ) ) … Read more