Can I See Your ID?

In one of the after shows for WordPress Weekly, I discussed with Brad Potter and Michael Torbert that I would like to see an additional column of information be added to the WordPress backend that would show the Unique ID number of a post or category. The reason being, this type of information is not available in plain site and it seems like many themes have options which require you to know the ID number of something before you can show, hide, or manipulate that data.

It’s true that the ID number can be located by simply hovering the mouse cursor over a post or category when in the backend of WordPress, but I’d like to see that information presented in plain site. Actually, I wouldn’t mind if their was a Screen Option called ID# which would show or hide the column.

The argument against this idea is that a large majority of the WordPress userbase does not need to know this information. At least, not have it available in plain site. The other argument against this idea is that, it’s not a problem until a theme or plugin requires you to know this knowledge. Last but not least, the information is readily available by hovering over a link which means you can still figure out the UID without adding UI to the backend.

So despite hearing the other side of the argument already, I wanted to throw this out there to see what you thought. As it stands, some of the more advanced themes and plugins use this UID information, so is it up to those guys to create a solution which doesn’t require me to figure out a UID for a category or post? Or, by using these more advanced plugins/themes, is it up to me to figure out that I can get the information by hovering over the link? In the end, is this a non-issue, or does it have merit?

Funny thing is, older versions of WordPress actually showed this information in plain view.

19

19 responses to “Can I See Your ID?”

  1. I think it should be up to the theme / plugin author to make allowances for users of their code to be able to find the necessary information. Either add code into their theme or plugin, for example in the options page to identify posts or pages as the case may be; or, give easily understood instructions on how to find the information, i.e.: how to and where to hover over the post.

  2. Jeff, your use case sounds to me like a perfect candidate for a plugin (or, as JB said above, functionality that the author of a plugin that uses such information can add to that plugin itself).

    It definitely doesn’t need to be the default behavior to expose such information in the back-end.

    A screen option? Perhaps… again, sounds like something for which it ought to be easy enough to write a plugin (for those who know how to write plugins; I’m not one of them.) :)

  3. But there is a plugin for this case

    The argument against this idea is that a large majority of the WordPress userbase does not need to know this information.

    This isn’t IMHO really an argument – WP has a few other features (e.g. posting via mail) that are useful only for a minority… Not speaking about that simple solution to hide IDs defaultly and make it possible to turn them on in Screen options (or ev. in global settings).

    I agree this was one of the not-so-much-thoughtful touches on 2.5.

  4. It’s not that most people don’t need the post/page/category ID, or even that it can be found by hovering over the name. It’s that nobody will ever need it in a bare installation of WordPress.
    The only time anyone will ever need the ID number of a post/page/category is when a theme/plugin asks for it, or if you’re creating/editing a theme/plugin. Just because you go and get some StudioPress or iTheme theme that asks for a category ID or a page ID, that doesn’t mean that WordPress should have it in there.
    If you know enough to create a theme or plugin, you should know enough to be able to figure out the ID of what you need. If a plugin or theme needs it, it is the responsibility developer of the plugin or theme to supply this information.
    What if I write a plugin or theme that needs a post meta or user ID number, should WordPress supply those in an additional column as well?
    There are 9834589 different types of unique ID numbers for the various types of data in WordPress. NONE of it will ever be needed by a user unless they’re making or editing a plugin or theme, or the plugin or theme asks for it.
    .-= ´s last blog ..Twitter Updates for 2009-06-12 =-.

  5. I generally opt for simplicity and just check the URL to get the ID when I need it rather than adding yet another plugin ;)

    But there is at least one plugin that does this, Reveal IDs for WP Admin, that I have used when working with other designers who want an easier way to get these IDs.

    It seems like they added a lot of flexibility in the backend for the end user with 2.8, it seems like the option of IDs would be a reasonable option to add as well.

  6. The question is why do they need it?

    I don’t really think they do. It is very easy to write functions in plugins and themes that take named arguments, or provide an options screen that gives a named drop down, so I don’t think there is much of an excuse for simply expecting an integer, unless the functions are only for developers to use.

  7. I know many users that need this information, and it’s not because a plugin/theme asks for it. If I had one major gripe with WordPress, it is the removal of this info from the admin pages. While it doesn’t have to be a default, I don’t see why there shouldn’t just be screen option to display it.

    I get questions about how to find the ID (usually for categories, pages, and posts) often more than once a week. It’s a rarity that it’s because one of my plugins/themes need it.

    Several WordPress functions (template tags) ask for it. I suppose I could list them all here, but it’s easy enough to find these functions in the Codex.

  8. Valid arguments presented for both sides of the issue, but I wonder why earlier versions of WordPress provided this information upfront and in later versions, this information was taken away. I’m going to find out.

    But I like Andrews stance and I’ve also seen this accomplished in themes. Where you check mark the actual names of things instead of providing UID as parameters.

  9. It seems this is becoming more a question of who needs the ID and for what purposes.

    I am in full agreement that developers should by all rights be able to find an ID relatively easily, but perhaps the average user or non-technically inclined blogger may need something a bit more obvious. Which IMHO still falls to the developer to provide a method if their theme or plugin needs the details for the end-user to make use of it.
    .-= ´s last blog ..Desk Mess Version 1.0.6 =-.

  10. Hovering over a link to find an ID does not seem particularly intuitive to me.

    The first thing I did when I installed WordPress was to start hacking up the default theme. I knew nothing of PHP, ‘template tags’ or any of that stuff. However I did quickly learn that I needed to know page ID’s to make use of wp_list_pages(). WordPress is designed with theming in mind, so not providing the necessary information for new users to do this easily seems a little silly to me. I started using ID’s back when they were readily available in the admin panel, but I assume it would have had me baffled for a few minutes if I’d started with 2.5+.

  11. The numerical identification of posts and pages is key information that should be displayed in a column next to the title, number of comments, and so on.

    As Justin points out, this information is essential for many WordPress template tags, as well as many plugins and themes. Removing it was a mistake, and leaving it out is just laziness.

    The argument that users who need this information should know how to get it is absurd. Perhaps WordPress should stop showing post dates, page titles, and the number of comments for each post, because, after all, anyone who needs that info should know how to get it.

  12. “The argument that users who need this information should know how to get it is absurd. Perhaps WordPress should stop showing post dates, page titles, and the number of comments for each post, because, after all, anyone who needs that info should know how to get it.”

    Post dates, page titles, number of comments, etc is all information that your average blogger will use regularly. Again, post,page,category ID numbers are never needed unless developing a theme/plugin or if a theme/plugin needs it and didn’t supply the title/name dynamically for you.

    This issue has been brought up over and over in trac for a very long time as well as recently, and has consistently been shot down by the core committers.

    Removing it was a mistake, and leaving it out is just laziness.
    It’s not laziness, as the patch for it has been submitted numerous times. All a core committer had to do was commit it.
    .-= ´s last blog ..Twitter Updates for 2009-06-12 =-.

  13. ID numbers are never needed unless developing a theme/plugin or if a theme/plugin needs it and didn’t supply the title/name dynamically for you.

    Exactly how do you know that IDs are never needed otherwise? There are millions of WordPress users out there using WordPress for just about everything imaginable. Did you take a poll? How many actual WP users have you spoken with about this? How accurate are your statistics? Seems unreasonable to presume to know when IDs are (or aren’t) needed, and then base your argument against ID-inclusion on that presumption.
    .-= ´s last blog ..Block Multiple IP Addresses with PHP =-.

  14. @Jeffro – You say: “I wonder why earlier versions of WordPress provided this information upfront and in later versions, this information was taken away.”

    I say, after testing the usability of the product, that the main devs have decided that “almost nobody,” as Michael Torbert said, needed the IDs. I develop my own themes and pass specific IDs to certain tags. It’s tedious and it takes a minute out of my time, but improving WordPress the product means it has to be improved to the user.

    For every theme and plugin dev out there, there are thousands upon thousands who would find this random sprinkling of numbers to be confusing. Maybe that’s why they took it out. This is the product, growing up and expanding from being a developer-intensive app to one that cares most for its most basic of users.

    That said, yes, this is the kind of thing for a plugin, in fact it would be nice if different plugin devs teamed up to produce a suite of “essential plugins” for devs and/or users. The better for-hire theme devs and admins drop in a package of essential plugins for their clients, why don’t we all come together and do the same for ourselves?
    .-= ´s last blog ..Site redesign: Richmond =-.

  15. Well, looks like I’ve lost this argument. I don’t think this is plugin territory at all. I’d agree that a plugin would need to be made if the ID information wasn’t available at all but since you can hover over the link, it defeats the purpose of a plugin but I still think both worlds are met if it’s merely just a screen option.

Newsletter

Subscribe Via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.