WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've seen in various tutorials where people white the custom field Name in this fashion: intro-image. I thought I would make more sense to use (user friendly names instead of something that looks like a variable).

Is using hyphen (or underscore) a good practice?

share|improve this question

You can use spaces and uppercase chars(periods, commas, and more) without worry. Only time you'll see any problems is with register_globals on(strict array key names when enabled), but who has it enabled these days?

Any of these should be fine as custom field names.

  • My Image
  • My.Field
  • 112,Hello

Use whichever you prefer.. :)

share|improve this answer

I have always use "custom_field_name" and never had any problems with that but i guess that with a more user friendly approach "Custom Field Name" you could run into wired problems.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.