# Content Types Overview Screen

> Adds Tools > Content Types, a table of every registered post type and taxonomy with its labels, visibility, archive, REST base, URL slug and item count.

- Type: PHP
- Runs: Admin only
- Category: [Developer](https://wpide.com/library/category/developer/)
- Tags: custom-post-types, taxonomies, debugging
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/dev-content-types-overview/

## Code

```php
add_action( 'admin_menu', function () {
    add_management_page( 'Content Types', 'Content Types', 'manage_options', 'wpide-content-types', function () {
        $yes = function ( $value ) {
            return $value ? '✓' : '—';
        };

        echo '<div class="wrap"><h1>Content Types</h1><h2>Post types</h2><table class="widefat striped"><thead><tr><th>Name</th><th>Label</th><th>Public</th><th>Archive</th><th>REST base</th><th>URL slug</th><th>Published</th></tr></thead><tbody>';

        foreach ( get_post_types( array(), 'objects' ) as $type ) {
            $count = wp_count_posts( $type->name );
            printf(
                '<tr><td><code>%1$s</code></td><td>%2$s</td><td>%3$s</td><td>%4$s</td><td>%5$s</td><td>%6$s</td><td>%7$s</td></tr>',
                esc_html( $type->name ),
                esc_html( $type->label ),
                esc_html( $yes( $type->public ) ),
                esc_html( $type->has_archive ? ( is_string( $type->has_archive ) ? $type->has_archive : '✓' ) : '—' ),
                esc_html( $type->show_in_rest ? ( $type->rest_base ? $type->rest_base : $type->name ) : '—' ),
                esc_html( is_array( $type->rewrite ) ? ( $type->rewrite['slug'] ?? '' ) : '—' ),
                esc_html( number_format_i18n( isset( $count->publish ) ? (int) $count->publish : 0 ) )
            );
        }

        echo '</tbody></table><h2>Taxonomies</h2><table class="widefat striped"><thead><tr><th>Name</th><th>Label</th><th>Post types</th><th>Hierarchical</th><th>Public</th><th>REST base</th><th>URL slug</th></tr></thead><tbody>';

        foreach ( get_taxonomies( array(), 'objects' ) as $taxonomy ) {
            printf(
                '<tr><td><code>%1$s</code></td><td>%2$s</td><td>%3$s</td><td>%4$s</td><td>%5$s</td><td>%6$s</td><td>%7$s</td></tr>',
                esc_html( $taxonomy->name ),
                esc_html( $taxonomy->label ),
                esc_html( implode( ', ', (array) $taxonomy->object_type ) ),
                esc_html( $yes( $taxonomy->hierarchical ) ),
                esc_html( $yes( $taxonomy->public ) ),
                esc_html( $taxonomy->show_in_rest ? ( $taxonomy->rest_base ? $taxonomy->rest_base : $taxonomy->name ) : '—' ),
                esc_html( is_array( $taxonomy->rewrite ) ? ( $taxonomy->rewrite['slug'] ?? '' ) : '—' )
            );
        }

        echo '</tbody></table></div>';
    } );
} );
```

## Notes

Handy for finding the internal names other snippets ask for.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Content Types Overview Screen" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
