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

Is it possible to hard define a custom field value with a function?

As in, no matter what WordPress will always set the value of 'some_meta' => 'this'

share|improve this question
up vote 0 down vote accepted

Instead of directly grabbing the meta, wrap it in a function, then you can provide a default, or, comment out the innards and just return "this"

share|improve this answer
Thanks for your reply, I believe this is working the way I intended – Kyle Oct 5 '12 at 11:38

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.