Custom Fields
Re-Envisioned
Support General Add Select Values from Other Custom Fields Reply To: Add Select Values from Other Custom Fields

#12737

Anh Tran
Keymaster

I have optimized your code to make it much shorter here: https://ghostbin.com/paste/uk3zq. As all the year has a same meta box, it can be wrapped in a function.

However, the speed is slow maybe because of the post field. Each post field make a query to the database to get all posts. As you have 14 post fields for 14 years, there are 14 queries. That might be the cause.

Update: I have updated the plugin on Github https://github.com/wpmetabox/meta-box/ that has an improvement for the post field. Now it runs only 1 query instead of 14. Please download from Github and try it.