Support » Fixing WordPress » Change meta field of Custom Post Type UI with Ajax?

  • Resolved maorb

    (@maorb)


    Hi,

    Another issue I encounter with the UI admin page of a custom post type.
    Let’s say I have a meta field of a Custom Post Type, this field is a boolean and can have 2 statuses.

    I want to use Ajax and let the end site’s editor to be able to click on this (custom) post’s field and change its status.
    Let’s say I have post type ‘books’ and a meta field ‘status’ with values – ‘available’ and ‘not available’.
    I want this status to be clickable for each book, and the click will change from ‘available’ to ‘not available’ and vice versa.

    Now, I have the function custom_columns($column) that does the switch/case to all fields to be shown in the UI.
    So I know that I need to add some AJAX call in the case of the field.
    This is where I need your help to know how to make this call. Of course I want to have thi Ajax call with jQuery, which will be much easier.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • I resolved this and wrote some Ajax functionality to integrate to my admin UI.
    Basically just like any other Ajax calls.

    Could You please post your code, others people (me as well) could benefit of it 🙂 Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change meta field of Custom Post Type UI with Ajax?’ is closed to new replies.