Is it better practice to use ‘This Name Format’ or ‘this-name-format’ for custom fields?

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?

Related posts

Leave a Reply

2 comments

  1. 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.. 🙂

  2. 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.