Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
René

Dynamic Column Value

Hey there,

I’m wondering if it’s possible to create a custom column where I can calculate a value for a quick overview in the table view of the admin.

I found topics including ac_register_columns. Not sure if this is right, but when checking the source code quickly this method was removed anyway.

My detailed problem:
I have a repeater ACF field with multiple ratings (subsets). Out of these, there’s an average “main” rating calculated and used in the front end. In the table view, I would like to show that average as well. Is there a possibility to create such a dynamic field within Admin Columns?

I could create a new meta field to kind of cache that value and always update in on save of the post. But this is kind of ugly. A useless value in the database that could be outdated.

Thanks for your help and cheers

2 months ago
Stefan van den Dungen Gronovius
Developer

There is no way to create a column for that with our plugin.
The only way is to write your own column for that.
In your case, I would recommend writing a custom column the WordPress way, and not specifically for our plugin.
Our plugin will find all custom columns and show them in the ‘Default’ section when adding new columns.
This article shows how you can write a custom column in WordPress:

https://www.admincolumns.com/wp-admin/post.php?post=228896&action=edit

You could even use ChatGPT to help you with that as I was able to let it write a custom column with a specific purpose as a test.

1 month, 4 weeks ago

You must be logged in to reply to this topic.