Help Center

Knowledge base Plugins JetEngine How to Use Custom Callback to Display Image in the Admin Columns

How to Use Custom Callback to Display Image in the Admin Columns

This tutorial will teach you to use a custom callback to display information from the meta fields in admin columns within custom post type lists created with the JetEngine WordPress plugin.

Before you start check tutorial requirements:

  • Elementor (Free version) or Block editor (Gutenberg)

  • JetEngine plugin installed and activated with Custom Post Type created and several posts added. If you have not done this yet, please follow this tutorial

It is possible to display the content from the meta fields in admin columns with the help of a custom callback function provided by the JetEngine plugin. 

Let’s assume you need to display the picture from the Media meta field in the custom type posts list. This tutorial will show you how to do it.


Before proceeding with the tutorial′s steps, create a backup or replicate the actions on the staging site. The backup ensures the website restoration if an error occurs. To learn more, proceed to the How to Backup and Restore a WordPress Website with a Plugin article.

Add the Code

Open the file manager on your PC and find the folder with WordPress files. Proceed to wp-content > themes and open the folder with the theme you currently use.

functions document

Use the Notepad app to open the functions.php file and insert the following code:

It is a specialized piece for image insertion. Pay attention that instead of “_image,” you have to insert the meta field name from which you want to take the picture.

Add a New Admin Column

Go to the WordPress Dashboard and open the JetEngine > Post Types tab. Click on the needed post type to edit it.

custom post types list

Define the Admin Column Settings

When the settings block opens, scroll down to Admin Columns and click the “Add New” button.

Now it is time to go through the column settings:

post type admin column custom callback
  • Title — choose the column name displayed in the content type posts list;
  • Type — select the “Custom Callback” option;
  • Callback — insert the callback function name here;
  • Column Order — type in the value that will define the number of the column’s order;
  • Prefix and Suffix — set the text placed before or after the data in the column;
  • Is Sortable —  enable this toggle if you want to make the column sortable.

Update the Post Type

Finally, click the “Update Post Type” button and go to the custom post type on the WordPress Dashboard to view a new Image admin column.

properties post type image admin column

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

Was this article helpful?

Need help?

Ask Facebook community

Get answers from 22K Crocoblock Community experts from all over the world.

Start a live chat

Ask question to support agent and share its details via chat messages.