So I was wondering if it’s possible to dynamically create meta boxes in the post admin. I have a lot of data but don’t want to hardcode every meta box needed in functions.php.

An example would be a custom post type for movies, I want to create different meta boxes for all the actors in the movie.

Is it possible to add meta boxes dynamically with the ability to add and delete them within the post admin?

Thanks!

6 Answers
6

I would seriously consider looking into the WPAlchemy metaboxes class. It does exactly what you are after and so much more.

http://www.farinspace.com/wpalchemy-metabox/#have_fields_and_multi

This class is so great that I am frankly shocked that there is not a lot more discussion about it. *If there is a better metabox class, I’d love to hear about it, though I am very happy with WPAlchemy.

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *