CM Tooltip Guide: Override WordPress theme limitations to Display tooltips outside of main content

The user guide has moved to a new location

This page is no longer maintained

In the Pro+ and eCommerce editions of the CM tooltip plugin, there’s an option available to highlight terms and display tooltips not only in the main content area, but also in the user comments section.

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 highlightthem]

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.