I need to do the exact same what "update" button in the WP Backend does, but with PHP
wp_update_post should be the correct answer, but it is not.
The issue: I have a number of posts, with Custom Fields. All Custom Fields in All Posts are Checkboxes. If I look at all those posts, in the WP Post Edit screen, all checkboxes are correctly "checked"(!)
This is not the case if you look at the same post in the FrontEnd. The Checkboxes then show as "not checked"
After UPDATE (with the update button) but NO Changes, just click update in the WP Post Editor (or quick edit), the Checkboxes show as "checked" also in the front end.
Since I can not do this action for a hundreds of posts manually, I need a php action to do that.
wp_update_post DOES NOT WORK. It does just NOT PERFORM THE SAME ACTION as the UPDATE button, as it seems to me, due to what I experience.
Is there any other possibility to do the EXACT same as UPDATE (button) does?
Aucun commentaire:
Enregistrer un commentaire