Skip to content

Build a documentation section

Documentation adds a Docs post type with an archive and nested Doc Categories. You can write individual docs, group them into categories, and choose whether their URLs include the category path.

Before you start

  • You need an Administrator account on a site running Marketers Delight 6.0 or later.
  • Documentation also requires WordPress 6.2 or later and PHP 7.4 or later.
  • Install and activate the Documentation Drop-in.
  • Decide what to call the section and whether its URLs should follow its categories.

Set the section's name and URL

  1. Go to Docs → Settings.
  2. Set Page Slug if the archive should use something other than docs.
  3. Set Plural Label and Singular Label if you want names other than “Docs” and “Doc.”
  4. Check Enable hierarchical URLs if doc and category URLs should include parent and child category slugs.
  5. Select Save.
The Documentation settings on the demo, labeled Colophon, with Enable hierarchical URLs, Page Slug, Plural Label, and Singular Label visible

The demo calls its Docs section Colophon; your labels may differ.

SettingWhat it changesDefault
Page SlugArchive URL segmentdocs
Plural LabelName of the Docs sectionDocs
Singular LabelName of one docDoc

With Enable hierarchical URLs checked, a doc in a Getting Started category can use a URL such as /docs/getting-started/install/. The singular label is also used when a doc is shared in Stream, if that Drop-in is active.

Set the archive title

On Docs → Settings, enter a Page Title for the archive. You can also enter Lede, Subtitle, and Content around the title, then select Save. The Page Title, Archive, Layout, Loop, and Byline panels below use Marketers Delight's standard post type settings.

The Documentation archive settings on the demo, labeled Colophon, with Page Title, Lede, Subtitle, and Content visible

Set the archive title and introductory content.

Organize and write docs

  1. Go to Docs → Doc Categories and create the categories you need. Categories can nest under one another.
  2. Go to Docs → Add New and write a doc.
  3. Assign its Doc Category.
  4. Optionally, give it a parent doc to make it a subpage.
  5. Select Publish.

Each category has its own page settings. You can change those without changing the Docs archive settings.

Check the result

Open the Docs archive and the doc you published. The archive should use the title and slug you saved, and the doc should appear in its category. If a doc is missing, check that it is published and assigned to the intended category. If its URL is different from what you expected, check Page Slug and Enable hierarchical URLs. If you use a caching plugin, clear its cache and reload.

Alex Mangini

Hi, I'm Alex! I started writing about web design and blogging at 13 years old, which turned into client work, which led to building my own software. 15 years later I'm still at it, and Marketers Delight is the epitome of my philosophy for building on the web.