Comments on: Add ACF Fields to Admin Columns https://pluginrepublic.com/add-acf-fields-to-admin-columns/ WooCommerce Plugins Fri, 24 Mar 2023 00:59:55 +0000 hourly 1 By: Ryan https://pluginrepublic.com/add-acf-fields-to-admin-columns/#comment-193937 Fri, 24 Mar 2023 00:59:55 +0000 https://pluginrepublic.com/?p=108#comment-193937 Thank you for this! I have an unfortunate situation in which the field my client wants to show in the columns is just called ‘date’ and of course wordpress just uses the post date. I found and tested a plugin called admincolumns that will allow me to show it, but I’m not sure they’re doing it… so if there’s a way that I can do it without a plugin, I’d prefer that…

]]>
By: Kevin Shenk https://pluginrepublic.com/add-acf-fields-to-admin-columns/#comment-121924 Tue, 08 Dec 2020 15:59:35 +0000 https://pluginrepublic.com/?p=108#comment-121924 In reply to hamish mckay.

That’s great. You can also just hook into the same function you used to define the columns earlier if you want to use the same column set:

add_filter( ‘manage_exhibition_posts_columns’, ‘exhibition_filter_posts_columns’ );
add_filter( ‘manage_edit-exhibition_sortable_columns’ , ‘exhibition_filter_posts_columns’ );

]]>
By: Thomas Rudolf https://pluginrepublic.com/add-acf-fields-to-admin-columns/#comment-105407 Tue, 30 Jun 2020 04:45:18 +0000 https://pluginrepublic.com/?p=108#comment-105407 Thank you Gareth,
perfekt code and perfekt explanation 🙂

]]>
By: Gareth https://pluginrepublic.com/add-acf-fields-to-admin-columns/#comment-29180 Thu, 15 Aug 2019 05:49:11 +0000 https://pluginrepublic.com/?p=108#comment-29180 In reply to Colin Crawford.

Hi Colin – glad it helped.

Thanks

Gareth

]]>
By: Colin Crawford https://pluginrepublic.com/add-acf-fields-to-admin-columns/#comment-29139 Wed, 14 Aug 2019 20:39:30 +0000 https://pluginrepublic.com/?p=108#comment-29139 Gareth you are brilliant,
I have tried quite a few tutorials without success and your tutorial was the easiest to follow and you explained it in a few sentances whereas the other tutorials were hard to follow without an explanation.

I have achieved what I set out to do and I wish I found yours first.

Thank you.

]]>
By: hamish mckay https://pluginrepublic.com/add-acf-fields-to-admin-columns/#comment-14849 Wed, 14 Nov 2018 08:56:01 +0000 https://pluginrepublic.com/?p=108#comment-14849 To get sortable columns I used this little snippet.

function my_column_register_sortable( $columns )
{
$columns[‘start_date’] = ‘start_date’;
return $columns;
}
add_filter(“manage_edit-exhibition_sortable_columns”, “my_column_register_sortable” );

]]>
By: Jeremy Carlson https://pluginrepublic.com/add-acf-fields-to-admin-columns/#comment-5306 Sat, 23 Dec 2017 00:38:51 +0000 https://pluginrepublic.com/?p=108#comment-5306 Thank you. This was much more succinct and easy to accomplish than I’d thought. Not sure why this had been a mystery to me. Well explained. The one part that tripped me up was your inclusion of ‘public’ function — I did, in fact, copy your code and change it, but I wasn’t putting it into a class. Got it sorted though.

Very helpful!

]]>
By: Grietje https://pluginrepublic.com/add-acf-fields-to-admin-columns/#comment-4782 Fri, 24 Nov 2017 17:18:06 +0000 https://pluginrepublic.com/?p=108#comment-4782 Thanks!

]]>
By: François https://pluginrepublic.com/add-acf-fields-to-admin-columns/#comment-2265 Wed, 07 Jun 2017 14:27:56 +0000 https://pluginrepublic.com/?p=108#comment-2265 Thanks a lot!

]]>
By: Catapult Themes https://pluginrepublic.com/add-acf-fields-to-admin-columns/#comment-1509 Mon, 06 Feb 2017 07:47:05 +0000 https://pluginrepublic.com/?p=108#comment-1509 In reply to PK Hunter.

The Codex will help: https://developer.wordpress.org/reference/functions/add_action/

The 10 is the priority; the 2 is the number of arguments.

]]>