Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am trying to create a metabox input field in a custom post type and it does not work even if I followed the instructions the best I could. I am not a PHP dev so I guess it could be just a small thing that is missing or it is wrong.

By not working I mean, I does not show at all in the WP UI.

Here is the code:


The other issue is that the Tag is not named even if the function is there.

Thank you in advance. Eri

share|improve this question
A question should not rely on a link to an external website. Put the code into your question please. –  toscho Oct 30 '12 at 2:33
@toscho sorry about that, everytime i was adding the code was the editor was removing some part of it. –  Eri Mehmeti Oct 31 '12 at 4:37
add comment

1 Answer

In the code, you are trying to pass functions as parameters in add_action(). That syntax works in javascript, but not so well in php. Try doing it with passing the function name instead in add_action()

share|improve this answer
Lambda functions are working fine in PHP 5.3+. –  toscho Oct 31 '12 at 3:32
add comment

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.