Duplicate Snippet
Embed Snippet on Your Site
Display Post and Page IDs in WordPress Columns
This PHP code enables you to display the IDs of posts and pages within WordPress columns. By incorporating this code into your WordPress theme or plugin, you can conveniently view the unique identifiers of your posts and pages in the admin panel's listing view. This can be particularly useful for developers and administrators who need a quick reference to these IDs for various tasks, such as customization or troubleshooting. The code enhances the management of your content by adding an extra layer of information to the admin interface.
// If you are seeing the “IDs” twice, remove the following line
$columns['post_id'] = 'ID';
Code Preview
php
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
Comments