Problem:
Client wants to add post meta at the same time as inserting posts with the function wp_insert_post.
Solution:
Add the post meta fields as an array using the meta_input parameter.
Relevant Documentation:
https://developer.wordpress.org/reference/functions/wp_insert_post/#parameters
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | - |
- | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | - |
Supporter timezone: Europe/London (GMT+00:00)
Este tema contiene 2 respuestas, tiene 2 mensajes.
Última actualización por hace 6 años, 10 meses.
Asistido por: Nigel.