• I read that you should only use small letters for custom field meta keys – is this necessary? I noticed that WP still saves them correctly when they start with a capitalized letter.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    It depends on your O/S. Some are case sensitive, others not. For consistency and reliability it’s better to use lower case. You can successfully use upper case on a case sensitive system as long as you correctly maintain which letters are upper case. Many users won’t do that, and being unaware of case sensitivity will think something is broken when it is in fact user error. It’s safer to use all lower case, but it’s not required.

    Thread Starter andi0tx

    (@andi0tx)

    @bcworkz Thanks. I want to set up several custom fields for Woocommerce products, and I want their label name to be displayed before their value. So if I use a different meta key name than I want to display as the label, I would need additional code for each field – that’s why I was wondering if I could simply use the label I want to be displayed as their meta key name.

    Moderator bcworkz

    (@bcworkz)

    All lower case is more a guideline for plugin and theme devs who distribute to others. For one specific site do whatever works best for you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Meta keys for custom fields’ is closed to new replies.