Create a Plugin to Combine Multiple Custom Fields into one Unix Date field
-
Hi,
On my WordPress, I have a lot of event-based posts with custom fields relating to the event start time. The custom fields are in the following format:
Day – 01 to 31
Month – 01 to 12
Year – i.e. 2010
Time – 00:00In order to output this in more variable ways, and to make sorting and more advanced implementation possible, I have switched from using these to using a unix timestamp on new posts. However, there are a couple of thousand posts to convert to this!
I’d like to code a plugin that will take the above custom fields for each post that has them, and convert them into a unix timestamp.
Questions:
1) Anyone done anything similar?
2) Any bits of code that would help me get started?The issues for me are 1) I haven’t written a plugin for more than 3 years; and 2) I don’t know how to get these figures into a unix timestamp (i.e. script-wise), as I’m fairly unfamiliar with this sort of stuff!
Any help appreciated!
- The topic ‘Create a Plugin to Combine Multiple Custom Fields into one Unix Date field’ is closed to new replies.