CM Tooltip (CMTG) - How To - Include Glossary Category In the Term Permalink
How To Include Glossary Category In the Term Permalink
It is possible to include the glossary category in the term permalink.
There are two ways to do this.
1) Adding a Custom Backlink to a Category
First method provides the following permalink the sctructure: your-site.com/category-name/term/
You can create a separate page for displaying terms of a certain category. It can be done with a shortcode [glossary] and parameter cat for specifying certain category.
Then navigate to Admin Dashboard → CM Tooltip Glossary → Categories.
While creating or editing a category, find the field Taxonomy Index Link and input there a permalink of the page you created. Note: this option was introduced in version 4.2.0.
Don't forget to save the changes.
Result on the front-end:
2) Using Third-Party Plugin
The second way provides the following permalink the sctructure: your-site.com/glossary/category-name/term/
First thing we need to do, is to install an additional free plugin that allow to edit permalinks for custom post types. You can use for this, for example, the plugin Custom Post Type Permalinks.
We need it, to make the custom post structure work on the next step.
Now we need to edit the glossary term permalink. Navigate to Admin Dashboard → CM Tooltip Glossary → Settings tab.
Head to the General Settings tab.
Find the option Glossary Terms Permalink:
And add /%glossary-categories% to the glossary, so it would look like this: glossary/%glossary-categories%
There can be anything else instead of glossary, as you can change it according to your needs. For example:
So, anyway, you just need to add /%glossary-categories% after it to include a category to the term pemalink.
Then click the button Save Changes on the bottom of the page.
Configuring is done. Now you can see above the settings, that the format of the Glossary Term link now contains a category.
Make sure that all your terms belong to some category, otherwise you and your users won't be able to open term pages without categories.