Custom Field from database table
-
I’m sure I could solve it by massive hacking, but I’d prefer to know the elegant solution offered by WordPress gurus…
I have “custom fields”, named “Interview”. The value of this field is usually a link. Since my site is going to be a quote-collection site, I add many posts with the exact same metadata. Along that it’s a bit inconvenient to always copy/paste the “Interview” field; it would be very unpleasant, if some publishers relocated their interviews, then I’d need to change the “Interview” fields one by one.
I have an idea – I should have a distinct database table to hold interviews, then I’d only need to refer to them by their IDs. For example, when I publish my post, I supply “_14” for the “Interview” custom field, and WordPress would fetch the corresponding row from the interviews table, and show that. If an interview’s location changes, I only need to modify the corresponding row in the interviews table.
Any ideas how could I solve it elegantly? I mean, where should I add these modifications? And of course, for performance optimization, pages those show more than one posts should fetch the interviews table only once!
- The topic ‘Custom Field from database table’ is closed to new replies.