Created
January 10, 2019 08:07
-
-
Save httpstersk/568662c847a0df5eaae2871c3508b262 to your computer and use it in GitHub Desktop.
➍ Get the list of all categories
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { select } = wp.data; | |
const { getEntityRecords } = select( 'core' ); | |
const MAX = 100; | |
const categories = getEntityRecords( 'taxonomy', 'category', { per_page: MAX }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment