CM Tooltip (CMTG) - Localization - Displaying Tooltip Outside the Main Content

Parsing Tooltip Content Everywhere

Back to User Guide

This feature is only available in the Pro+ and Ecommerce editions.

The settings illustrated in the image below can be found in  Admin Dashboard → CM Tooltip → Settings → General Settings.

However, some of the more advanced WordPress themes are using more sophisticated methods of setting up the content of posts and pages then “the_content” function, (such as PageBuilder, VisualComposer etc), which means that the terms are not parsed nor highlighted.

There are at least two ways to highlight terms anywhere on your website, regardless of what WordPress theme you’re using:

1) By wrapping content with a shortcode:

[cm_tooltip_parse] some content with terms [/cm_tooltip_parse]

This method should be good enough for users who have some experience with WordPress. When a part of the page is wrapped with this shortcode, the parsing mechanism will search for glossary terms exactly as if it was outputted by the “the_content” function, which should override the limitations of certain WordPress themes.

2) By wrapping the apply_filters:

apply_filters('cm_tooltip_parse', $content, true)

$content Is the variable we want to parse in search for glossary terms in order to highlight them]

This method is mainly for experienced WordPress users, such as plugin authors and WordPress theme developers. Instead of wrapping content with the shortcode, one can apply the filters hooked into the “cm_tooltip_parse”, which is an internal hook introduced by the CM Tooltip Glossary, and then echo the result. Again, the parsing mechanism will highlight the terms from the glossary.

Note on Compatibility

If you use a page builder and the shortcode is not working, a possible fix is to wrap the first and last instances of the shortcode with an HTML object. 


<div>[cm_tooltip_parse]</div> Content 1 [/cm_tooltip_parse]

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam et.

[cm_tooltip_parse] Content 2 [/cm_tooltip_parse]

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam et.

[cm_tooltip_parse] Content 3 <div>[/cm_tooltip_parse]</div>

This fix has been reported to work on the Nicepage page builder.

More information about the CM Tooltip Glossary WordPress Plugin

Other WordPress products can be found at CreativeMinds WordPress Store

Let us know how we can Improve this Product Documentation Page

To open a Support Ticket visit our support center