Getting started
Glossary by Codeat is the free WordPress plugin that allows you to create a glossary for your website and turn your content into a complete and navigable resource.
Glossary's superpower is to automatically create word lists from your content and generate the corresponding styled tooltips.
The terms and their definitions will be grouped in a glossary or dictionary section and automatically linked to the corresponding words within your posts and pages.
You can use Glossary with the classic WordPress editor or with Gutenberg: it’s 100% compatible.
In this knowledgebase, we’ll see how to make the most of Glossary - from the first steps to the most advanced customization features.
Installation
To install Glossary on your WordPress backend, follow these steps:
- Head over to the Plugins page
- Click on Add new
- Enter the keywords “glossary codeat” in the search field in the top right corner
- Glossary will pop-up on top of the search results
- Click on Install Now and then Activate.
You’re done!
Alternatively, if you prefer the manual installation, proceed as follows:
- Download the .zip file from the plugin’s page on the WordPress.org repository
- Unzip the folder.
- Upload it through your FTP inside the
/wp-content/plugins/ folder
in your WordPress installation.
Terms
- Introduction to terms
- How to add a new term to your glossary?
- Enabling Glossary for specific post types
- How to link terms to internal posts/pages
- How to link terms to external URLs
Introduction to terms
The first thing to do after installation is to create your own glossary or dictionary.
By definition, a glossary is an alphabetical list of terms, each of which has its definition.
With the Glossary plugin, you can create your list of terms and their definitions.
Then, you can sort them hierarchically into macro-categories.
Glossary relies on WordPress standards: every term our plugin creates is a classic WordPress Custom Post Type.
To learn more about Custom Post Types, you can read the official WordPress documentation.
For this demo, we have created the following macro-categories of terms:
- Back to the Future
- Jurassic Park
- Star Wars
Within them, we have created the following sub-categories of terms:
- Characters
- Movies
How to add a new term to your glossary
From your WordPress dashboard, go to Glossary > Add New.
You will see a text area similar to the one for adding new posts in WordPress:
This website uses screenshots with the Classic Editor but it works in Gutenberg editor or the default WordPress editor (today).
Enter your new term in the title and write its definition in the text area:
The title you choose will become the search key through which the Glossary engine will link all the instances of this term in the posts and pages of your website. The text added in the body will be the description of the term.
You can also indicate other key terms that will point to this description.
Once you wrote the new term's definition as seen above, scroll the page to the Glossary Auto-Link settings area.
Enter the additional key terms in the Additional Search Terms for this definition field.
Separate each term with a comma. The field is not case-sensitive by default. Case-sensitive matching is a PRO feature.
If you don’t wish to include the terms of your glossary in a specific post or page of your site, you can disable the feature.
Within each post or page, indicate whether you want to ignore the Glossary suggestions and hide links and tooltips:
To have even more granular control over the terms of your glossary terms that will appear in your posts or pages, you can use the option Select specific glossary terms.
You can also find this option in the Glossary Post Override section:
When you write a new post or create a new page, you can use this option to link the content to specific taxonomies. In this way, the Glossary plugin will highlight only the terms included in the specified taxonomies.
See it in action on the demo site.
Enabling Glossary for specific post types
Whatever the nature of the post types on your website, you can always enable or disable Glossary on each of them, separately.
Go to Glossary > Settings > Settings for Post Types:
Now toggle on/off your post types as you prefer.
Glossary also allows you to choose whether or not to activate its functionality in other archives of your site: archives, categories, tags, taxonomies or RSS feeds.
How to link terms to internal posts/pages
By default, Glossary will link each key term (and all related ones) to the page that contains its definition.
If you want to link a key term to a different post (or page) of your website, you can do it. 😉
By default only the 'post' type is enabled but you can change that behavior with a PHP filter.
When you’re inside the edit screen of your term, scroll to Glossary Auto-link settings.
You will see the option What type of link?
Check the option Internal URL.
Head over to the following option named Internal and click on the magnifying glass icon:
A list of all the internal pages of your site will appear.
Choose the one to which you want to link the term:
The "Read More" it will be added automatically if a internal/external link is added, in case you want the "Read More" for the Glossary term link itself:
- Enable Internal URL
- Not define any link
- Save the Glossary term
How to link terms to external URLs
By default, Glossary links each key term (and all related ones) to the page that contains its definition.
But if you need to link a key term to a destination outside your website, you can do that too. 😉
When you’re inside the edit screen of your term, scroll to Glossary Auto-link settings.
You will see the option What type of link?
Check the option External URL.
Head over to the following field named Link to external URL
There, you can indicate the external URL you want to link:
You can also choose to open the external link on a new window and mark the link as “No Follow”.
If you want, you can also indicate that the link points outside of your website by adding an icon to external links, as it happens in Wikipedia.
Here you can see how to do it.
Terms counter
To keep up to date with the number of terms you create with Glossary, you can use the term counter at any time.
You will find it in the Glossary’s Settings tab, as shown below:
This area contains the single term count, the number of additional terms that refer back to your main key terms, and the combined total number.
The numbers update daily thanks to a cron job, but you can always force the recalculation by clicking on the “Update Terms Count” button.
Slugs
- Introduction to slugs
- How to Change Slugs and URLs for Your Terms
- How to Change Slugs and URLs for Your Glossary
Introduction to slugs
Each term of the glossary has its unique slug.
A slug is the part of a URL that identifies a particular page of a website. The slug has a user-readable form and therefore facilitates the identification of individual pages.
How to Change Slugs and URLs for Your Terms
The Glossary plugin will create it automatically, but you can customize it at any time by using the native WordPress Slug field, as shown below:
How to Change Slugs and URLs for Your Glossary
To change the slug and the URL structure for your glossary and all related archives, follow these steps:
- Go to Glossary > Settings
- In the Settings panel, go to the Glossary terms slug field
- Change the default value (glossary) with your desired label (for our demo, we chose the label wiki)
This will change the default “yoursite.com/glossary” slug in “yoursite.com/wiki”.
Repeat the same process to change the slug for your glossary categories: change the value for the Glossary Category Slug (we chose glossary-category). You can change also the label of the post type but the feature is avalaible only in the PRO version.
You might need to flush or update your WordPress Permalinks once you have set this option.
To flush Permalinks, head to the WordPress dashboard and select “Permalinks.”
Once on that page, save the current settings, and WordPress will automatically update the Permalinks:
Warning
The slugs must not be equal to each other. It’s not possible to create a new slug equal to the one already assigned to a page or category.
The Archive Page (or Glossary Index)
Once you start creating definitions for your terms, Glossary can group them in a category called “glossary-cat” and publish them on a single page that will aggregate all the terms. There is an option for this in the plugin settings.
Go to: Glossary > Settings > Add Alphabetical list at the top of Glossary Archives
This archive page is created automatically, and “glossary” is its default slug (e.g., “yoursite.com/glossary”). By typing that URL, you will land on the archive page for all your terms, similarly to the one below:
Warning
To avoid conflicts, don’t create a Page for your glossary archive. The Glossary Index, like the one above ,is a post-type, and our plugin will create it automatically.
If you already have a page named “glossary”, we recommend changing its slug, as seen above.
Order of terms in the glossary
Our plugin allows you to sort through the terms of your glossary quickly.
By default, you can track them by the initial letter or by a number, if you used a numerical order instead of alphabetical order.
For example, by typing:
https://YOURSITE.EXT/glossary/?az=a
you will get a page containing all the terms of your glossary that begin with the letter A.
Likewise, if you type:
https://YOURSITE.EXT/glossary/?az=7
You will get a page containing all the terms of your glossary identified by the number 7.
Why can this behavior be useful to you?
With this functionality, you can create menu entries for each letter of your archive.
To do so, you can use the Custom Link functionality of WordPress menus.
Go to Appearance > Menu > Custom Links and add your URL and Link Text entry:
Alternatively, if you have a PRO license you can use a PRO shortcode to link the single letters to the relative archive pages.