This page redirects to an external site: https://developer.wordpress.org/reference/functions/get_all_category_ids/
Languages: English • Italiano • 日本語 (Add your language)
Retrieves all category IDs.
<code style="color: #000000"><span style="color: #0000BB"><?php get_all_category_ids</span><span style="color: #007700">() </span><span style="color: #0000BB">?></span></code>
None.
To print a list of categories by id: name
<?php
$category_ids = get_all_category_ids();
foreach($category_ids as $cat_id) {
$cat_name = get_cat_name($cat_id);
echo $cat_id . ': ' . $cat_name;
}
?>
Since: 2.0.0 Deprecated: 4.0.0
get_all_category_ids() is located in wp-includes/category.php.