Registering standalone meta boxes for the Overview screen

This article outlines how to add standalone custom meta boxes to the Overview screen using the core meta box API introduced in AffiliateWP 1.9.

Below are detailed instructions that cover the following steps:

Defining a display callback for the meta box

Registering the custom meta box

Hooking it up to WordPress

Defining a display callback for the meta box

The most important part of a meta box is the information it displays. When registering a standalone meta box for the Overview screen, a display callback function must be defined so that when the meta box is registered, AffiliateWP knows what to render.

Here is an example display callback for a meta box named 'My Custom Meta Box':

The example above is echoing some simple content to be displayed inside of the meta box container when it's rendered in the Overview screen. Once the meta box has been registered, AffiliateWP will rely on this callback to supply the content for display.

Registering the custom meta box

Once a display callback has been defined, it's time to actually register the meta box. This is fairly straightforward: