Underscores in custom fields

While trying to perform a WP_Query using meta_query(), I had some trouble because the custom fields created by a plugin had _ in the beginning of its name.

Although I noticed it was stored this way in the database, I had no idea why it was there and thought I had to reference it without the underscore (for the record, that is wrong).

Why do some custom fields start with underscores and others don't? What are the underscores used for? Are they mandatory in some circumstances?

Answers 1

Related Questions