April 6, 2019 at 3:02 am #9344
I need to prepare a form.
Admins needs to enter post title, attach thumbnail image,
select taxonomy. Based on selected taxonomy,
I need to make a WP_Query and on submit, it attached the post ids returned from WP_Query to the post_meta.
Following is my github gist for the form.
I need to read selected taxonomy term id, then pass that term id to on_submit_query function (written at the end of the file.). it shall return post ids from that WP_Query and I need to simply update that id array to newly created post at a post meta key post_ids_key
1) Could you please tell me how can I achieve that ?
2) Every time a new post is created, is there any way it can be checked, if post exists then, update the post only in piklist.
June 12, 2019 at 11:15 am #9410
June 20, 2019 at 2:01 pm #9419
I suggest you look at the
piklist_save_fieldshook, that should help you look at your field data before save.
Using the standard WordPress filter
wp_insert_post_data, will also help you look at data before it’s saved:
You must be logged in to reply to this topic.