Back to contents

JetEngine: How to Use Custom Callback to Display Information in Admin Columns

Keep reading this tutorial in case you want to learn how to use a custom callback to display certain information in admin columns for posts of custom post type created with JetEngine.

It is possible to display the needed content from the meta fields in admin columns with the help of custom callback provided by JetEngine plugin. We are going to show how to show the date based on the example of an image.

Using custom callback to display needed information in admin columns

1 Step – You need to add this code in the functions.php file of your theme in the wp-content > themes folder beforehand. In our case, we have added this one.

functions.php file

2 Step – Then, open the JetEngine > Post Types section in the WP Dashboard. There is a custom post types list. You need to proceed to edit the certain custom post type, which you want to add an admin column to.

JetEngine > Post Types section in the WP Dashboard

3 Step – When the settings block opens, scroll down to the Admin Columns and click the +New Column option.

Admin Columns block

4 Step – Here you should specify the title of admin column, select the Type: Custom Callback and insert the callback function name below. Moreover, you can define the column order, a value prefix, and a value suffix.


5 Step Now, click the Update post type button and go to the custom post type in the WP Dashboard to view a new Image admin column.

view a new Image admin column

A great job! Now you know how to display the data from the meta fields, media files, in particular, using the callback option of JetEngine.