0

Whats the difference between the wp_list_categories and get_categories?

Wordpress codex says

use get_categories if needs a function that does not format the results

what format is this referring to? Will it affect the performance if I use the other one? And if i want to display all the hierarchical custom taxonomy links on a page, should I use those two functions or use another one?

2
  • 1
    Have you actually tried using any of the functions. If you did, you have already answered your own question with use get_categories if needs a function that does not format the results Dec 15, 2015 at 9:10
  • @Pieter Goosen kk i will go and test out first : ) thx
    – vid Proli
    Dec 15, 2015 at 9:12

1 Answer 1

1

wp_list_categories gives you HTML markup of links (<a>) to the categories while get_categories just returns the data to be used for whatever you wanted.

But actually Pieter is right, in such cases just give it a try, nobody will get hurt ;)

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.