How to get category list in wordpress -


get_the_category_list(); wp_list_categories(); 

above functions not working in project. can't new created categories in wordpress.

https://developer.wordpress.org/reference/functions/get_terms/

i recommend using get_terms

  $terms = get_terms( 'category', array(    'hide_empty' => false,   ) ); 

Comments

Popular posts from this blog

unix - grep command not match start of new line with another regex -

sql - calculate weighted average for each day and id based on time intervals in PostgreSQL -

Sort a complex associative array in PHP -