Support » Plugins » Hacks » Expand custom meta box?

  • I’ve built myself a plugin that allows users to add a start date/time and end date/time to a post. The data is then displayed within the post itself but, most importantly, it allows me to create an event list.

    I’ve created a custom meta box to help users add this info – all works well so far but I’ve run into a limitation: I can only enter one set of start/end time pairs per post. There are instances when I will need more – like an event that happens twice, on two different days.

    See the code here.

    Conceptually, I suppose I need to add an array at the top levels of the functions but I’m not really sure. And my Javascript knowledge is minimal at best so I have no idea how to deal with displaying the additional fields in the meta box – sort of like when you click ‘Add Custom Field’ in the regular Custom Fields box.

    I’m totally lost on this so any thoughts or suggestions appreciated!

  • The topic ‘Expand custom meta box?’ is closed to new replies.