Sorry, I’ve had to change my answer after checking the WordPress Codex on adding custom editable data to the quick edit. So you’ll have to remove the references to $post_id
too (from the add_action
arguments and from within your function).
It looks like the quick_edit_custom_box
only takes 2 arguments: $column_name
and $post_type
. Then for getting and displaying the value, this has to be done using some more PHP and Javascript.
If you read further in to the WordPress Codex on the quick edit custom box and read further down to the section on ‘Setting Existing Values‘, you’ll see there’s a fair bit more work required in order to do this.
I’d suggest reading the docs in a bit more detail as it’s not quite as straight-forward as I first thought…
Related Posts:
- Get page ID of page that is set as the posts page
- Are post ID’s reliable?
- Get current post id in functions.php
- get all posts ID from a category
- Get the current post ID as a variable in Javascript
- Is post ID number always incremental n+
- How to add a “publish” link to the quick actions
- Are all ID’s used unique?
- $post->ID displays wrong ID
- Remove Posts Quick Edit link for specific user role? WP 3.3
- At my posts archive page, outside the loop, get_the_id() returns the top most post’s ID
- Accessing $post variable from template part
- Showing random content / pictures from earlier posts in a sticky post?
- Get the post_id of a new post
- get post id in while loops outputting page id
- How can I display a specific user’s first published post?
- Adding variable for post title so post template can include auto-generated link to view on external website.com/{post title}
- Getting post id from wp_insert_post_data function?
- Does an article (post) id ever change?
- How to get the post’s parent ID?
- Can a page_id and a post_id be same?
- Is there a better, more efficient way to get the post id outside the loop?
- Getting current post ID in functions.php
- Buddypress activity id
- How blog page in WordPress works : blog page retrieve first post ID
- How to get post bulk edit action trigger and get edited post ids?
- Post-ID in url differs from $post->ID
- Why is my Blog Page ID == First Post ID?
- current post with current author
- Is it possible to change post id for an already added menu item in WordPress?
- Get ALL post ID’s export list (Only id’s. Php or sql not important )
- How to get next post ID?
- Search results posts_orderby and ID
- Retrieve post ID from “querying” URL
- How to get a post’s content? [closed]
- obtain the author id given the post id
- How to get ID of the page included with get_page()?
- How to I retrieve the ID from the Posts page?
- Crazy Question – Updating Post ID
- Add a variable in a post
- Why I can not I use the variable outside my function?
- retrieve the oldest post id
- Edit custom fields in posts list
- Is it advisable to use $post->comment_count instead of get_comments_number( $post_id )
- WP_Query custom field pass the post id
- Accessing Post ID Within Loop
- How do post IDs work in WordPress?
- Are post, page and category IDs unique to each other?
- The loop starting at a certain ID
- linking to post outside the loop
- Widget to show posts in the sidebar basing on its IDs
- Get a post’s ID
- Making posts permalinks consistent numbers
- How to get post id of last approved comment?
- How to get the post id (of the parent custom custom type) in a loop inside a widget?
- Get post slug and match with menu item slug to change css
- WordPress Post ids big increment
- Reuse old post ID for new post after deleting post
- Get post attachment with post id
- I need some explanation on global $post [duplicate]
- How can i take all ids from untrash_post action?
- How do I apply a wordpress function to something with no ID inside an archive page?
- Get from the dashboard the ID of the current post being edited
- Only get post_id [duplicate]
- Surrogate ID for posts, is there an alternative field in the posts table?
- Is it possible to have dynamic post id # in add_menu_page()?
- How can I display a specific number of post in a category via a url
- Using Post ID and Page ID in same function
- Adding custom fields to the Quick Edit screen – puzzled about the column concept
- unused post IDs
- Multi Quick Edit – Possible Or Impossible?
- Get attachment if matches a variable
- Custom post page has attributes of latest post [closed]
- Can I get custom post items in select box (dropdown)
- What is $post->ID
- View post with specific category id and name which I selected in the backend (drop-down option)
- How to get post ID after removing that post?
- Why does ‘get_the_ID’ work outside of the loop?
- Get WordPress post content by post id
- Get Posts Under Custom Taxonomy
- How to limit the number of posts that WP_Query gets?
- Stop WordPress Wrapping Images In A “P” Tag
- When is the ‘post_content_filtered’ column in database cleared by WordPress?
- Turn a URL into an Attachment / Post ID
- GET the excerpt by ID
- Stop WordPress automatically adding tags to post content
- Determine if page is the Posts Page
- How to get ‘post_content’ without stripping tags?
- How to add an admin notice upon post save/update
- Print Current Post Index number within Loop
- Should we trust the post globals?
- Optimize post insert and delete for bulk operations?
- Get the Current Page Number
- How do you add thumbnail support for custom post types?
- How to mark every 3rd post
- Change Posts per page count
- Keep featured content post in homepage with original order
- How to display related posts from same category?
- Can posts have parents?
- Is there a action hook for the “Empty Trash” button?