0

I'm having a custom post type (vehicle) and i attached a gallery (post) with image attachments in it.

Through my custom frontend form, I set all the post and postmeta details right, as i want to, so my theme handles them well.

When I try to edit a post through my form, all work well.But when I try to edit a post through wp-admin, the gallery images gets the post_id as the post_parent, and not the gallery_id I have set in my custom code.

The question is: How can i call a wp action / hook / function, when a post is been edit through the wp-admin and correct the post_parent of the post_id ? Is there any wp reference to help fix this and set the gallery_id as it is

Thank you in advance.

  • Has anyone already written a manual providing a solution to a problem specific to your code? No. Can anyone guess at a fix without seeing your source code and being able to replicate the problem? Unlikely. – s_ha_dum Dec 11 '15 at 21:01
  • @s_ha_dum get inside WP code and wp-admin, edit a simple post and try to find the action / hook / function that is triggered to use it in your custom function. There is no other source code, my ironic friend. – John Priestakos Dec 13 '15 at 13:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.