WordPress Glossary Plugin (CMTG) - Extras - How to Prevent Highlighting Terms Inside Links


How to Prevent Highlighting Terms Inside Links

Back to User Guide

What Is This About?

When adding terms with the WordPress Glossary plugin, you might face an issue when some link in your content is broken. It can happen if a link contains some glossary term, and it is automatically highlighted inside the link.

Example:

Front-end example - WordPress Knowledge Base Plugin
Front-end example

There're a few ways to fix this.

Exclude <a> Tag from Parsing

The easiest and best way is to exclude parsing terms in links by HTML tag. Navigate to Admin Dashboard → CM Tooltip Glossary → Settings → General Settings tab.

Navigation to the plugin settings - Knowledge Base WordPress Plugin
Navigation to the plugin settings

Scroll down to the section Term highlighting and find the option Exclude HTML tags from parsing. Select there the tag <a> and save the changes.

Excluding <a> tag from parsing - Glossary Plugin WordPress
Excluding tag from parsing

Highlight Only Space Separated Terms

An alternative way is to highlight only space separated terms. As words in links are mostly wrapped by other words or symbols, these terms will not be highlighted. In the same section Term highlighting, find and enable the option Highlight only space separated terms, then save the changes.

Highlighting only space separated terms - Tooltip Plugin WordPress
Highlighting only space separated terms

Prevent Parsing Using Shortcode

Another way is to wrap the link with the shortcode [glossary_exclude].

When editing the page, simply wrap the link with the opening and closing shortcodes, then save the changes. Example: [glossary_exclude] link [/glossary_exclude]

Excluding content from parsing - Tooltip WordPress Plugin
Excluding content from parsing

Front-end Result

Front-end result - Wiki Plugin for WordPress
Front-end result

More information about the WordPress Glossary 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
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.