Categories & Tags

Categories and tags are the two ways jekcms groups posts. Categories are hierarchical (a tree) and usually appear in navigation. Tags are flat and used for cross-cutting topics. Both live in admin/categories.php.

Creating a category

Click Add New in the top-right of the panel. The form has four fields:

  • Name — Display label shown in menus, breadcrumbs, and archive page titles
  • Slug — URL segment. Auto-generated from the name (e.g. "Best Recipes" → best-recipes). Editable before or after creation
  • Description — Shown on the category archive page (/category/{slug}) above the post grid. Supports Markdown
  • Parent — Optional. Pick any existing category to nest under it

Save and the category appears immediately in the post editor's category selector.

Slug editing

Slugs are unique across the categories table. If you change a slug on a live category, jekcms writes a 301 redirect from the old URL to the new one automatically — no broken links. The redirect lives in the url_redirects table and survives for 12 months unless you manually clear it.

Hierarchy

Categories support unlimited nesting depth, but two levels is the practical sweet spot for SEO and navigation. A typical structure:

Food
├── Recipes
│   ├── Breakfast
│   └── Dinner
└── Nutrition

The URL reflects only the final slug — /category/breakfast, not /category/food/recipes/breakfast. This keeps URLs short and prevents permalinks from breaking when you rearrange the tree.

Breadcrumbs on post pages do walk the full hierarchy: Home › Food › Recipes › Breakfast › Post title.

Bulk delete and merge

Select multiple rows via the header checkbox, then pick Delete or Merge into… from the bulk action dropdown.

  • Delete — Removes the category. Posts assigned to it are reassigned to Uncategorized (see Gotchas below)
  • Merge into… — Pick a target category. All posts tagged with the source categories get reassigned to the target, and the source categories are removed. This is a one-way operation — there's no undo, so export first if you're unsure

Merges also update redirects so old category URLs land on the target archive page.

Tags

Tags live on the same panel, under the Tags tab. They behave like categories but:

  • No hierarchy
  • No description field on the archive page (just the tag name)
  • Appear on post cards as small pills, and in the footer tag cloud widget (size weighted by post count)

Adding tags

The fastest way is from the post editor — type into the tag field and press Enter. New tags are created on the fly. In admin/categories.php you can also add tags directly, which is useful for pre-seeding a taxonomy before writing posts.

Renaming vs deleting a tag

  • Rename — Keeps all post relationships. Updates the slug and issues a 301 from the old tag URL
  • Delete — Removes the tag entirely. Posts keep their other tags; the deleted one is just detached. No redirect is issued because there's no replacement target

Use rename when consolidating ("js" → "javascript"). Use delete for typos or tags that no longer apply.

Where they appear on the site

  • Primary menu — Categories marked Show in menu (toggle in the edit form)
  • Breadcrumbs — Every post page, walking the parent chain
  • Archive pages/category/{slug} and /tag/{slug} list posts in reverse chronological order, with pagination
  • Sitemap — Every category and tag URL is included automatically
  • Post cards — Primary category shown as a colored chip; tags shown as text pills

Gotchas

  • Uncategorized is protected. You can rename it, but the delete button is disabled. jekcms needs a fallback so posts are never left with zero categories
  • Orphaned posts — If you delete a category that's the only category on some posts, those posts silently reassign to Uncategorized. Run a content audit afterward so they don't get lost
  • SEO of category URLs — Category archive pages are indexable by default. If you have thin categories (under 3 posts), set them to noindex via the edit form's SEO section to avoid low-quality pages in Google
  • Slug collisions — Categories and tags share a URL namespace. You can't have a category news and a tag news — the second save will fail with a uniqueness error

Be the first to know

New features, release notes & CMS guides — a couple of emails a month, no spam.