I have created a custom post type called Playlists using the “Custom Post Type UI” plugin.
Using ACF Pro I was able to add custom fields to the “Playlist” post page.
Now I want to add a custom field to the “Playlists” page in wp-admin (one where you see all the posts). URL: /wp-admin/edit.php?post_type=playlist (screenshot attached)
The idea is to select top 5 playlist posts. I would prefer that it can be done on the “list” page of wp-admin.
What you’re talking about is the customisation of the Posts list table. This is done via functions.php using the two following hooks:
I actually saved a gist which provides a similar music based example.
I hope this helps!
Your reply went to my spam! I used an alternate approach in meantime.
But I was not trying to add columns to the table but rather add custom fields on the post list page itself.
Is that doable with ACF?
I think he is talking about displaying columns for custom field in a playlist whereas I need editable fields for the listing page.
Maybe I have this pictured incorrectly (technically) in my head but see attached screenshot.
I’ve got a feeling @jags would like to assign custom fields to the Posts list page itself as its own entity and I’m pretty sure that’s not possible. However, I think what you could do is customise the in-built filter to achieve the same result.
Hey @jags, okay I think I know what you want to achieve, but I think you’ll need to apply the playlist position field to the playlist post itself. You could then customise the post lists screen to show the playlist position column and data for each post.
I’m guessing you’re aiming for an end result of being able to edit the playlist position via the post lists page itself. This could be done, by exploring the customisation of “quick edit”, but it doesn’t look like an easy task.
The other thing you could do, and this might be more straightforward, is use taxonomies. You could create a “position” taxonomy and then have terms for the position, you could have first, second, third and standard. It looks like Custom Post Type UI has a feature that allows you to add taxonomies to quick edit.
Thanks for detailed reply Dan.
This is the 1st time I am using ACF and after googling for 1hr I kind of felt what I was trying to achieve does not exactly falls into standard behaviour.
But ACF homepage said “Fields can be added all over WP” so I thought maybe I am missing something obvious. Glad to know that I wasn’t 🙂
I will stick to custom field on the page for this.
There is an ACF quick edit plugin floating around somewhere, or at least there was at one time.
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2020 Advanced Custom Fields. Subscribe