How to display CM Tooltip Glossary metaboxes on custom post type?

<<< Back to FAQ [/button]

The PRO editions of the CM Glossary Tooltip provide the metaboxes giving the options to override the general plugin options on given post/page.

Those metaboxes are by default only displayed for Glossary terms and built in Posts and Pages.

CM Tooltip Glossary metaboxes

Metaboxes added by the CM Tooltip Glossary Ecommerce (ver. 2.7.7)

There are two ways to display those metaboxes for Custom Post Types:

  1. (simple) Displaying the metaboxes in all Custom Post Types with an option

To display the CM Tooltip Glossary metaboxes in all post types without writing any code – go to Settings -> General Settings and find the section called Metaboxes.

If there’s no Metaboxes section it means you need to update your plugin.

Metabox options in CM Tooltip Ecommerce (ver. 2.7.7)

Metabox options in CM Tooltip Ecommerce (ver. 2.7.7)

  1. (advanced) Adding selected Custom Post Types through a filter

This way is more complicated as it requires some code manipulations.

The code snippet below should usually be placed in the functions.php file of your active theme.
It adds a function which adds two new Custom Post Types (‘your-custom-post-type’ and ‘another-custom-post-type’) to the list of post types displaying the metaboxes.
To use it, find the ‘your-custom-post-type’ and exchange it with the Custom Post Type you want.


add_filter('cmtt_disable_metabox_posttypes','function_adding_custom_posttypes');


function function_adding_custom_posttypes($postTypes) {
$postTypes[] = 'your-custom-post-type'; //this line is responsible for adding custom post type to the list
$postTypes[] = 'another-custom-post-type'; //you can copy this line as many times as you want to add more than one post type, or remove it if you only need to add one
}

Posted in: TooltipPro