For your my_ajax_admin_add_track() function, grab the form field data from the $_POST array, populate the required data in an array to call wp_insert_post(), then call wp_insert_post() passing it the post data. It should return the new post ID number if successful.
Related Posts:
- Remove rows in the manage post/page view
- How we can create menu from Appearance > Menu and use as a add-submenu-page for admin menu?
- Placing a Custom Post Type Menu Above the Posts Menu Using menu_position?
- Loading External Scripts in Admin but ONLY for a Specific Post Type?
- How to add custom columns to Custom Post Type admin screen
- Is it OK to move admin menu items?
- Prevent reload confirmation after AJAX save
- How to Change the Title of a Meta Box on a Specified Custom Post Type? [duplicate]
- How to add post_author column to custom post type
- WordPress User Roles, Custom Post Types, and Admin views
- How to make post sticky in the admin page?
- How to customize admin posts based on the user who is logged in
- Is there a way to have the view link on manage posts page to open in a new window or tab?
- Storing posts from query and accessing later via AJAX call
- Selecting a post in Dashboard
- Custom admin post.php page
- JS innerhtml changing style when using AJAX
- No Permission to add new Page, Post or CPT with Admin role
- Custom post type editor with dynamic selects, one drop down populating a second second drop down not working
- Admin Column does not populate with data
- Load Next Posts With AJAX not working with custom post type
- $post not working working in AJAX plugin with custom post type
- Load Next WordPress Posts With AJAX?
- WordPress notification if new post published
- How do I edit the WordPress post.php file?
- Multiple wp_editor instances in custom post type using Ajax
- Change Post Meta via AJAX from the posts list table
- Admin slow on Postlist (over 30k Posts in Database)
- How can I put content before my custom post type default pages?
- list articles in admin showing nested categories or slugs?
- Publishing failed. The response is not a valid JSON response
- Limiting the Number of User Posts to Their Own Posts
- WordPress Author Posts Review After Every Change In The Same WordPress Post
- Hide load more button if no more post in selected category
- Passing total post count to javascript
- Default post showing more than intended
- Display posts of only a certain category in WP Admin section?
- How to set up a private custom post type that is accessible in the administrative dashboard?
- How can I remove the “Add New” button in my custom post type?
- Multiple custom post types under one admin menu
- Linking Two Post Types
- How can I change the admin search posts fields?
- Custom post type: Add “Edit | Quick Edit | Trash | View” links to date (if title is not shown in column)?
- How can I filter posts by post_parent in the admin?
- How do I filter the excerpt metabox description in admin?
- WordPress Custom Post Type Admin Page really slow
- Pull Two Posts Into Custom Post Type `single-cpt.php`
- Post slug changed using code doesn’t reflect on editor when post is published
- is_singular() not working if called via callback function of admin-ajax.php
- Remove date and category filters when editing custom post types
- Filters post in admin with dropdown select, custom post type
- Admin List Dynamic Heading
- How to remove ‘create new post’ entry for a custom post type?
- Changing ‘view’ link for custom post type on list post screen?
- Show Two custom Post type and their posts on category page
- count_many_users_posts except current logged in user?
- How i can add ‘N’ page of ‘N’ pages under posts loop?
- I would like to have different styles for my posts based on the content of each post
- AJAX load more for different custom post type loops
- Some posts from custom post type to subdomains
- Add a custom text to admin footer in a Custom Post Type page
- wordpress remove views from action links in a custom post
- Getting 400 Bad Request on AJAX Call
- Plugin or method of allowing user to rearrange custom post types with drag and drop?
- Add to ‘action’ within post.php to allow more actions when editing a Custom Post Type in a plugin
- Get post format
- Template code to split a post and print a custom field?
- Send post changes to set email addresses (not users or subscribers)
- Custom post type title of each author in his own post
- Enable comments for post when comments meta box removed
- Require custom post type if is_admin() – template doesn’t show up?
- Custom Posttype URL
- Hide title field of selected post-types on edit pages
- How to filter custom post type by multiple Taxonomies
- open custom post type in popup window instead of page
- WordPress next post by ajax call on button click
- Permalink for specific post type
- WordPress custom post type post item data – show/fetch only on click with Javascript dynamically?
- How to display custom post type pagination buttons when processing AJAX request
- POST 429 Error when trying to place more than 20 images into post at once
- Adding specific custom fields (images) to post excerpt
- How to manage a dynamic multi-level page hierearchy system?
- Custom Post By Category
- custum post inner page not taking single-gallery.php? it redirecting to archive page
- Change Custom Post Type to Post + Category
- Ajax the create and edit post form into lightbox and get results
- Submitting custom post from frontend,jQuery ajax, and custom validation – can’t find proper place to insert wp_insert_post()
- Cannot use pages created on WP
- Calling specific page with wp query
- Customising the admin columns for a custom post type, but now most of the built in categories don’t display?
- How to get Last post Id of custom post type in wordpress
- Display a post count from a custom metabox selection
- Custom Post Type post not appearing
- Custom Plugin w/ Custom Post Types – Custom Posts Are Showing at all Privilege Levels – Is this possible to adjust?
- How to make a non-public post on wordpress approval?
- How to get permalink of post based on post name?
- Admin menu link with variable
- I am having a problem with fetching product data in the Gutenberg block editor
- Issues with Ajax Pagination and Filtering
- Adding a new custom post type using the editor causes 502 bad gateway error