Viewing 2 reply threads
  • Author
    • #9344
      Vineet Talwar

      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.

    • #9410
      Vineet Talwar

      Anyone ?

    • #9419

      I suggest you look at the piklist_save_fields hook, 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:

Viewing 2 reply threads
  • You must be logged in to reply to this topic.