The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other AJAXifying meta boxes in WP admin

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #27682

    Hello everyone,

    I would like to add AJAX to meta boxes in WP admin area – when adding/editing data for a custom post type.

    Here is a breakdown of what I’m trying to do:

    1. I have a custom post type for CDs
    2. Each CD can have multiple tracks
    3. I want the ability to add tracks one-at-a-time through a custom edit form
    4. I want to add tracks via AJAX (after hitting the “Add track” button, the track information is automatically added to the CD and I can add another track)
    5. I would like the ability to dynamically drag-and-drop tracks into a different order

    (This is similar to the WP Categories screen functionality in the Admin area. Where you can add category and it will appear in the list of all categories straight away and you are able to fill in a form and add another category).

    I got as far as creating a meta box with a static number of tracks. However, I don’t know how to proceed and add AJAX to the meta box to be able to add tracks “on the fly” as required.

    I would really appreciate any help! @Chris Coyier maybe you’ve done a tutorial/screencast about – I would really if someone could point me to the right direction. I’m quite new to WP, but really want to learn great stuff!

    Many thanks,


    Wow, weird that I stumbled upon this, I am extremely interested in accomplishing the same task. Something like this would make it insanely easy for the artist I am working with to manage the discography section of his website. I was able to create a custom post type for the artist to make entering basic discography information a bit easier for him, but if he wants to edit the “track list” he has to place it in an ordered list inside a simple textarea box, which introduces an added learning curve to the process, and is not very user-friendly for artists that do not care to learn HTML.

    How could I create an AJAX’ed meta box that allows the user to add/remove/drag&drop input fields, and when saved automatically displays them as an ordered list on the website?

    I’m not a web developer, but I know the basics, I understand the lingo, and I’m comfortable working with WordPress and PHP/XHTML/CSS.

    Any help is greatly appreciated!




    Can anybody provide some help/direction here? Pleeeease? :)



    I’m trying to do the same thing, but I’m doing it for a custom slider instead of music tracks on a cd. I wanted to give the user the ability to put in an image path (or even better, upload an image from the custom fields area and show a preview) and enter in a caption and sort the images in the order they want them displayed. They should be able to add one image, hit an ‘Add’ button and then keep doing that until all their images are displayed.

    Did anyone ever figure out how to do this?


    I think this might help: Reusable Custom Meta Boxes Part 3: Extra Fields. Look at the bottom in the “Repeatable Fields” section.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Other’ is closed to new topics and replies.