Log in Request my site

Sort with a category

A category sorts your content by city, by brand or by contract type. This article teaches you how to create a category and its terms, sort your content under these terms, and give each term a page, a color and an icon.

Understand categories

A category sorts the content of other types. On job offers, the category “Contract type” has the terms CDI, CDD and Freelance. A visitor then filters the offers by contract.

Lovely Render does not use WordPress taxonomies but its own sorting system. A category there is a content type and each of its terms a full content item, like a page: its text in the editor, its SEO, its translations and, if you want, its own address.

Content type and category compared
ItemContent typeCategory
Creation buttonAdd Post TypeAdd Category
Table on the screen Content typesContent typesCategories
Page for each content item or termYes, by defaultNo, by default
Place in the administration menuIts own menuUnder each type that targets it with a reference field

Create a category

  1. In the administration menu, open Content types.
  2. Next to the Categories table, click Add Category. The form opens in a side panel.
  3. In Singular, enter the name of the category in the singular, for example Contract type. In Plural, enter Contract types.
  4. Click Save. The category appears in the Categories table.

The form is that of a content type. Create a content type describes each of its settings.

Link a type to a category

A content type is linked to a category by a reference field. Without it, your job offers cannot carry a contract type.

  1. In Content types, click Edit on the line of the type to sort, for example Job offers.
  2. In the Reference fields section, click Add reference field.
  3. In Reference name, enter Contract type. In Target type, choose your category.
  4. In Cardinality, choose Single for one term per content item, or Multiple for several.
  5. Click Save.

The category then appears in the administration menu, under Job offers. If several types target it, it appears under each. As long as no type targets it, it has its own menu. Link your content together details reference fields.

Add terms

  1. In the administration menu, open your category, for example Job offers > Contract types. You can also click Add post on its line of the Content types screen.
  2. Add a term the way you add a page. Enter its title, for example CDI.
  3. Optional: write its text, its SEO in the SEO tab and its color in the Appearance tab.
  4. Publish the term.

A term, published or in draft, becomes a choice in the References tab of job offers. It appears on your site only once published.

Sort a content item

  1. Open the content item to sort in the editor, for example a job offer.
  2. In the right-hand sidebar, open the document tab, the one that carries the name of the type.
  3. Open the References tab. It has one block per reference field of the type.
  4. Click in the Search… field of the field you want, then choose a term from the list. The list shows ten terms in alphabetical order: type a few letters to find the others. The chosen term appears above the field.

The sorting is saved as soon as you choose the term. You do not have to save the content. The cross on a term removes it.

On a content list, your visitors then filter by term. List and filter your content shows how to add these filters.

Give each term a page

A category is created with no page for its terms. Each term appears in the lists and filters that mention it, but its address, for example /cities/lyon/, leads to a page not found. Search engines thus find no empty or duplicate page.

As long as a term has no page, the cards that show it display its title with no link to it. The link picker in the editor does not offer it.

  1. In Content types, click Edit on the line of the category.
  2. In the Visibility section, turn on Each item has its own page.
  3. Optional: turn on Has archive for a page that lists all the terms of the category.
  4. Click Save. Each term has its page at its address and enters sitemap.xml.

The page of a term can list the content that mentions it, for example the properties in Lyon on the “Lyon” page. Link your content together shows how.

Style the labels of a term

A term can carry two colors and an icon. They set its labels apart from the others, for example “Apartment” in blue and “House” in green.

  1. Open the term in the editor.
  2. In the sidebar, open the document tab, then the Appearance tab.
  3. Choose the Label background and the Label text color, from the colors of your design system or as a free color.
  4. Optional: choose the Label icon from the icon library. Remove takes it off.
  5. Save the term.
The Appearance tab of the Jardin de ville term: a dark green label background, white text, the contrast announced as 7.6:1 very readable (AAA) and a sprout as the chosen icon.

As soon as both colors are set, the tab announces their contrast and its WCAG level, as under the colors of a block. If dark mode changes this contrast, a second verdict follows Dark mode:. The verdict does not block saving.

The verdict does not appear on a transparent color, or as long as one of the two colors is missing.

The settings of the term and of the block
Set bySettings
The termThe background, the text color and the icon of its label.
The label blockThe radius, the typography, the margins and the effects. They are the same for all terms.

If the term has no color, the label keeps that of the block. A term with no icon shows none and reserves no space for it.

Translate a term

A term is translated like a page, from the Language tab of the editor. Its address is translated with the URL slug of its category. Translate a page details translation.

Hand the sorting to an AI

An AI connected to your site can do two things, in this order:

  1. Add a term, for example “add the city of Nantes”. This is the creation of a content item.
  2. Sort a content item under it, for example “this listing is in Nantes”. This second step puts the listing in the list filtered on Nantes.

A sorting that targets a term that does not exist is refused. Both steps happen on your Staging.

A Single reference field refuses two terms. If an AI proposes two, the sorting is refused, nothing is saved and the AI is told. Connect your AI explains how to allow it.

See also

Updated on

All documentation pages