WordPress Glossary Plugin (CMTG) - Shortcodes - Available Shortcodes


Glossary Plugin Shortcodes

Back to User Guide

TIP: What Are Shortcodes

Shortcodes add dynamic content to your site via a small piece of code.

Learn more: Shortcodes - How To Use | Finding ID of Post/Page/Other Content


Finding the Shortcode List Inside the Plugin

Each version of the WordPress Glossary plugin supports different amount of shortcodes. To check which shortcodes are supported with your edition of the plugin go to the admin menu and under the glossary plugin section click on Shortcodes.

Navigation to the shortcodes list - WordPress Knowledge Base Plugin
Navigation to the shortcodes list

Glossary-Related Shortcodes

Show Glossary Index

Shortcode: [glossary]

Since the [glossary] shortcode is by far the most advanced one, it allows for many oaraneters.

Parameters 

  • cat - the name of the category you want to show the list for.
  • disable_listnav - controls whether the alphabetical list navigation should be shown for the shortcodes (default: 0).
  • title_prefix - displays the text which will appear in the heading.
  • title_category - controls whether the category title should appear in the heading (default: 1 – show the category title).
  • letter - The preselected letter on the alphabetical index. (default: "all")
  • title_show - controls whether to show the heading – setting this to 0 means the heading won’t be displayed at all (default: 1 – show heading).
  • related (Pro+/Ecommerce) - you can use this parameter to show “up to X” related articles on Glossary Index List. Note: It only works for the Glossary Index List views displaying the description. The list of related articles will be rendered under the description, or instead of it (see parameter “no_desc”).
  • no_desc (Pro+/Ecommerce) - you can use this parameter (add no_desc=”1″) to disable the descriptions on Glossary Index List.
  • hide_terms (Pro+/Ecommerce) - you can use this parameter (add hide_terms =”1″) to stop the Glossary Terms from being displayed on the Glossary Index list (e.g. if you want to make a list of only the synonyms or abbreviations).
  • hide_abbrevs (Pro+/Ecommerce) - you can use this parameter (add hide_abbrevs =”1″) to stop the Glossary Term abbreviations from being displayed on the Glossary Index list (e.g. if you want to make a list of only the terms or abbreviations).
  • hide_synonyms (Pro+/Ecommerce) - you can use this parameter (add hide_synonyms=”1″) to stop the Glossary Term synonyms from being displayed on the Glossary Index list (e.g. if you want to make a list of only the terms or abbreviations)
  • disable_listnav - use 1 to turn off the alphabetical list navigation.
  • cmttct_taxonomy_X="Y" - pre-select a taxonomy with given ID (only with Custom Taxonomies Add-On).
  • freeze_cmttct_taxonomy_X - hide the taxonomy selection, if the value is already pre-selected (so the results are limited but there's no way to change it) (only with Custom Taxonomies Add-On).
  • search-term - This parameter is for Server-side pagination only.
  • itemspage="x" - This parameter is for Server-side pagination only.
  • glossary_index_style (Pro+/Ecommerce) - Accepts the following values:
    • Classic "classic", Classic + definition "classic-definition", Classic + excerpt "classic-excerpt", Small Tiles "small-tiles", Big Tiles "big-tiles", Classic table "classic-table", Modern table "modern-table", Sidebar + term page "sidebar-termpage"
  • languages_for_table (Ecommerce) - list of languages to be displayed on the Index page when "Languages table" view is selected. Accepts slugs, for example, languages_for_table="en,es". Learn more
  • tooltip_language (Ecommerce) - language which will be used for tooltips in the list of glossary items on the Index page. Learn more 

Example

[glossary cat="cat1,cat2" gtags="tag1,tag2" search_term="term" itemspage="1" letter="all" related="0" no_desc="0" hide_terms="0" hide_abbrevs="0" hide_synonyms="0" glossary_index_style="tiles" disable_listnav="1" ]

Example of using the shortcode - Knowledge Base WordPress Plugin
Example of using the shortcode

Show Glossary Search Form

Shortcode - [glossary_search]  

Displays the form which allows searching for the glossary terms.

Search bar - Glossary Plugin WordPress
Search bar

Tooltip-Related Shortcodes

Custom Glossary Tooltip

Shortcode - [glossary_tooltip content="text"] term [/glossary_tooltip]

Usage - Shows a tooltip with any content over a specific word or expression. Useful if you want to apply tooltips to really specific words that are not in the glossary or when you want to apply different tooltip contents to an existing term.

  • Required - Use either content or term_id
    • content - The tooltip will display the content specified in the parameter. Useful when the content is not updated constantly.
      • Example -  [glossary_tooltip content="This is the text that will be shown"] term [/glossary_tooltip]
    • term_id - The tooltip will display the content of a certain term, specified by its ID. Userful when the content is updated constantly.
      • Example -  [glossary_tooltip term_id="10000"] term [/glossary_tooltip]

        TIP: Finding the term ID

        Edit the term and check the URL. The ID is located after the "post=" segment, as highlighted.

        Term ID - Tooltip Plugin WordPress
        Term ID
  • Optional
    • link - Clicking the parsed word will direct the user to this link.
    • underline - The term and dashicon tooltips will not be underlined by default. If you want to force underline you need to set this parameter to 1.
    • tsize - Define the size of text inside of the tooltip. Note: this parameter was introduced in version 4.2.0.
    • tcolor - Define the text color inside of the tooltip. Note: this parameter was introduced in version 4.2.0.
    • bgcolor - Define the background color of the tooltip. Note: this parameter was introduced in version 4.2.0.
    • dashicon - The icon which will be used before term to display the tooltip (list of possible dashicons).
    • color - The color of the dashicon.
    • size - The size of the dashicon.

Example with all parameters:

[glossary_tooltip dashicon="dashicons-info" link="cminds.com" color="#802BB1" size="25px" tsize="18px" tcolor="#ffffff" bgcolor="#802BB1" underline="1" content="WordPress (WP or WordPress.org) is a free and open-source content management system (CMS) written in hypertext preprocessor language and paired with a MySQL or MariaDB database with supported HTTPS."]WordPress[/glossary_tooltip]

Example of the custom tooltip - Tooltip WordPress Plugin
Example of the custom tooltip

Apply Tooltip

Shortcode -  [cm_tooltip_parse] text [/cm_tooltip_parse]

Apply the tooltip to the text inside. Useful to force parsing in places where the "content" filter is not being used.

Note: The shortcode internally calls custom filter called 'cm_tooltip_parse' which can be used if you want the tooltip functionality outside of 'the_content':

$text_with_tooltip = apply_filters('cm_tooltip_parse', $text);


Toggle Theme

Shortcode -  [glossary-toggle-theme label="Test theme"]

Displays a selection allowing to change the class of the tooltips on a given page. Parameters:

  • label - Choose the label for the theme.
  • class - Choose the class for the theme.

Example

Result of using the shortcode - Wiki Plugin for WordPress
Result of using the shortcode

Show Only Part of Content Inside Tooltip

Shortcode - [cmtgend]

Use in the term definition page to show only part of the description in the tooltip, instead of the whole content. 

Enclose in the fragment that should be used shown in the tooltip. 

Example

First sentence.   [cmtgend]  Second sentence  [/cmtgend] . Third sentence.

Displaying part of content inside the tooltip - Wiki for WordPress
Displaying part of content inside the tooltip

Toggle Tooltips

Shortcode - [glossary-toogle-tooltips session="0"]

Displays the button allowing to temporarily disable the tooltips on a given page. Parameters:

  • session - Whether the result of the shortcode should be persisted in the session. Defaults to 0 (not persisted).

Example

Disabling/enabling tooltips - Wiki WordPress Plugin
Disabling/enabling tooltips

Content-Related Shortcodes

Exclude from parsing

Shortcode - [glossary_exclude] text [/glossary_exclude]  

The content inside the shortcode will be excluded from the parsing.

WordPress Glossary Plugin (CMTG) - Terms - Controlling Where Tooltip Appears


Show Related Terms

Shortcode - [glossary_related]  

Shows the related terms of the current term. To be used on term definitions.

Back-end/Front-end Example

Note that, if you have related terms enabled, the related terms box will appear twice, as in the example

Displaying related terms - WordPress as a Wiki
Displaying related terms

WordPress Glossary Plugin (CMTG) - Terms - Related Terms


Show Synonyms

Note: this shortcode was introduced in version 4.0.12.

Shortcode - [cmtt_synonyms]

Shows the term synonyms anywhere on the current term. To be used on term definitions.

Back-end/Front-end Example

Note that, if you have synonyms enabled, the synonyms box will appear twice, as in the example

Displaying synonyms - WordPress Internal Linking Plugin
Displaying synonyms

WordPress Glossary Plugin (CMTG) - Terms - Adding Synonyms


Show Merriam-Webster Dictionary

Shortcode [glossary_dictionary term="term name"]

Display the Show Merriam-Webster Dictionary definition. [Ecommerce only]

  • term - The term for which the Dictionary definition should be displayed.

Note: You need to have an API code to properly use this shortcode.

WordPress Glossary Plugin (CMTG) - Integrations - Merriam Webster


Show Merriam-Webster Thesaurus

Shortcode - [glossary_thesaurus term="term name"]

Display the Merriam-Webster Thesaurus definition. [Ecommerce only]

  • term - The term for which the Thesaurus definition should be displayed.

Example

Displaying Merriam-Webster Thesaurus definition - WordPress Glossary Plugin
Displaying Merriam-Webster Thesaurus definition

Note: You need to have an API code to properly use this shortcode.

WordPress Glossary Plugin (CMTG) - Integrations - Merriam Webster


Show Google Translate Content

Shortcode [glossary_translate term="text-to-translate" source="english" target="spanish"]

Display the Google Translated definition of the term. [Ecommerce only]. Parameters:

  • term - The term for which the Dictionary definition should be displayed.
  • source - The language in which the Dictionary definition is displayed.
  • target - The language into which the Dictionary definition should be translated.

Note: You need to have an API code to properly use this shortcode.

WordPress Glossary Plugin (CMTG) - Integrations - Google Translate 


Show Wikipedia Definition

Shortcode - [glossary_wikipedia term="term name"]

Displays the Wikipedia definition of the term. [Ecommerce only] Parameters:

  • term - The term for which the Wikipedia definition should be displayed.

Example

Displaying Wikipedia definition - Wiki Plugin for WordPress
Displaying Wikipedia definition

Note: You need to have an API code to properly use this shortcode.

WordPress Glossary Plugin (CMTG) - Integrations - Wikipedia


Additional Shortcodes (Community Terms)

For these two shortcodes install Glossary Community Terms Add-On.

Community Terms Dashboard

Shortcode - [terms_dashboard]

Example

Displaying user dashboard - WordPress Knowledge Base Plugin
Displaying user dashboard

Suggest a Term

(Requires Glossary Community Terms Submission Add-On for WordPress)

Shortcode - [community_terms_form]

Example

Displaying a form for suggesting terms - Knowledge Base WordPress Plugin
Displaying a form for suggesting terms

Terms Counter

The following shortcode allows to display the total amount of published glossary terms.

Shortcode - [glossary_terms_amount]

Note: this shortcode was introduced in version 4.3.0 of Pro+ and Ecommerce editions only.

Example

Using the shortcode - WordPress Glossary Plugin
Using the shortcode
Result on the front-end - Wiki Plugin for WordPress
Result on the front-end

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.