Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello, ahsanic! You can do it this way:

    yoururl.com/wp-json/taxonomies/category/terms

    Also, there is a way to get all post from a single category like this:

    yoururl.com/wp-json/posts?filter[category_name]=NameOfTheCategory

    Replace “yoururl.com” for your actual URL and NameOfTheCategory for the actual category name.

    Also, if you’re using a custom post type… add this: &type=custompost

    That goes at the end (or beginning) and remember to replace “custompost” with your actual custom post type.

    Hope it works ??

    Thread Starter ahsanic

    (@ahsanic)

    Thanks mkiisoft, it works!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to get all the categories of wordpress site?’ is closed to new replies.