Signocore Glossary keeps its data in a standard post type with a few meta keys, has one filter for the term lists and prints markup with stable IDs and classes. This page covers what you need to build on it from a theme or a plugin.
The wpsgls_terms_query_args filter
Every site-wide list of terms passes its get_posts() arguments through wpsgls_terms_query_args before it queries. Use it to limit the lists by language, tag or anything else WP_Query supports.
apply_filters('wpsgls_terms_query_args', array $args, string $context);
| Parameter | Type | Description |
|---|---|---|
$args |
array |
Arguments for get_posts(). They select published wpsseo_term posts with suppress_filters set to false. |
$context |
string |
The list being built, from the table below. |
Return the arguments as an array.
| Context | List | Arguments to keep |
|---|---|---|
glossary |
The glossary page and the [wpsgls-glossary] shortcode. All terms, ordered by title. |
orderby and order, because the letter sections follow the query order. |
index |
The term list behind automatic links and tooltips. All terms. | |
word_count |
The [wpsgls-word-count] shortcode. All terms, as IDs. |
fields set to ids. |
recent_widget |
The Recent Glossary Terms widget, with numberposts from the widget and ordered by date or by the page_views meta. |
The filter runs when a list is built, not on every page view. Each list is stored per locale for up to a month and rebuilt when a term is saved or deleted or the settings are saved. After you add or change a callback, save Glossary → Settings once to rebuild them. Because the lists are stored per locale, a callback can depend on the current language, but not on the current user or the current page.
This example keeps terms tagged "internal" off the glossary page and out of the automatic links:
add_filter('wpsgls_terms_query_args', function (array $args, string $context): array { $internal = get_term_by('slug', 'internal', 'post_tag'); if ($internal instanceof WP_Term && in_array($context, ['glossary', 'index'], true)) { $args['tag__not_in'] = [$internal->term_id]; } return $args; }, 10, 2);
For a callback that limits every list to the current language with Signocore Multilanguage, see Multilingual glossaries.
The related term lists on term pages, below posts, on tag archives and on products do not use this filter. They are matched through tags.
Post type and REST API
| Property | Value |
|---|---|
| Post type | wpsseo_term |
| Supports | Title, editor, excerpt, author and custom fields |
| Taxonomy | post_tag, shared with posts |
| Address | The glossary page's slug followed by the term slug, such as /glossary/api/, with glossary as the base until a page is chosen. There is no post type archive. |
| REST base | wpsseo_term, so terms are at /wp-json/wp/v2/wpsseo_term |
The glossary page's ID is stored in the wpsgls_glossary_page option, and the plugin defines the SIGNOCORE_GLOSSARY_FILE constant, which other plugins can check to detect it.
Meta keys
The meta keys are not registered for the REST API. Read them with get_post_meta().
| Key | Stored on | Value |
|---|---|---|
synonyms |
Terms | The synonyms as one comma-separated string, such as Application programming interface, Web API. Split it on commas and trim each part. |
custom_headline |
Terms | The Custom Headline. Removed when the field is emptied. |
page_views |
Terms | The view counter as a number. It is created at the first counted visit, so terms that were never viewed have no value. Visits by administrators, previews, bots and other automated requests are not counted. |
_wpsgls_exclude_autolink |
Terms | 1 when Exclude from automatic linking is ticked. Removed otherwise. |
_wpsgls_disable_links |
Any post of the linked content types | 1 when Turn off glossary links and tooltips in this content is ticked. Removed otherwise. |
On term pages, the plugin replaces the title shown by the_title with the headline from the Term template or the Custom Headline. post_title itself always holds the plain term.
CSS classes
The stylesheet takes fonts and colors from the theme: lines and quiet text are mixes of currentColor. Turn off Default Styling to style everything yourself; the markup stays the same.
| Selector | Element |
|---|---|
body.glossary-page |
The page chosen as Glossary Page. |
#glossary-letter-list |
The letter bar. Letters with terms are a elements linking to #letter-{letter}, letters without terms are span elements, and the letter in the address gets .active. |
#glossary-search |
The search field wrapper, with the input and .wpsgls-search-count. |
#glossary-word-list |
The term list, with .columns-1 to .columns-6 and .wpsgls-layout-list or .wpsgls-layout-cards. |
.letter |
One letter section, with the letter in an h4, .wpsgls-letter-count and a ul of entries. |
.wpsgls-word |
The term or synonym inside each entry link. Synonym entries are li.is-synonym with the term they lead to in .wpsgls-word-of. In the Cards layout, terms also have .wpsgls-word-desc. |
.synonyms, .synonym |
The synonyms at the top of a term page. |
.related-words |
Related terms, with an h2 heading on term pages and tag archives and an h3 heading below posts and in the product tab. |
.widget_wpsgls_recent, .widget_wpsgls_search |
The two widgets. |
a.wpsgls-link |
Term links in content that get automatic linking or tooltips. Links with a tooltip carry data-wpsgls-title and data-wpsgls-desc. |
.wpsgls-tooltip |
The tooltip, with .wpsgls-tooltip-title, .wpsgls-tooltip-desc and .wpsgls-tooltip-more. It is added to the end of body. |
The Cards layout sets --wpsgls-columns on #glossary-word-list from its .columns-N class, and cards never get narrower than 220px. The List layout uses CSS columns of at least 240px.
The .related-questions block on term pages comes from Signocore FAQ's data and is styled by Signocore FAQ.
Structured data
Signocore Glossary prints no structured data itself. Signocore SEO reads the glossary: it describes each term page as a DefinedTerm and the glossary page as a DefinedTermSet that lists up to 500 published terms, with each term pointing back to the set. Both need a Signocore SEO Pro license. See Structured data in the Signocore SEO documentation.
With Signocore SEO active, term pages also get a breadcrumb trail from the home page through the glossary page to the term. With Signocore Multilanguage active, the glossary page in the trail is its translation in the current language when one is published. Each step uses its Breadcrumb Title from Signocore SEO when one is set.