This snippet is to be pasted into the file “functions.php” your theme WordPress . It allows you to add a new column in the overview page of your blog articles. This column simply displays the unique identifier of your item (Article ID). The ability to hide the column is also available via the tab “Options” screen.
GKID function ($ column) {$ Column ['ID'] = 'identifier';return $ column;}add_filter ('manage_posts_columns', 'GKID', 5, 2);add_filter ('manage_pages_columns', 'GKID', 5, 2);GKID function ($ column, $ ID) {if ($ column == 'login') {echo '<strong>'. $ ID. '</ strong>';}}add_action ('manage_posts_custom_column', 'GKID', 5, 2);add_action ('manage_pages_custom_column', 'GKID', 5, 2);
Note that once the column has been added, you may see it is far too broad or far away.We can easily change the width. To do this, you have to just paste the following code in the file “functions.php” of your theme. The size can obviously be changed.
GkAdminH function () {echo "Login <style> # {width: 100px;} </ style>";}add_action ('admin_head', 'GkAdminH');
