Inicio - Documentación - POM Theme - 05 Content models - Connect post types and taxonomies

Connect post types and taxonomies

The relationship is configured on the taxonomy. Its Enabled post types selection controls which editors can assign the vocabulary and which custom post type can use that taxonomy in archives, queries, and optional hierarchical permalinks.

Build the relationship in order

  1. Create and save the custom post type.
  2. Create the custom taxonomy.
  3. Select the post type under Enabled post types.
  4. Decide whether term archives remain public.
  5. Decide whether Enable hierarchical URLs is required.
  6. Save the taxonomy.
  7. Create representative parent and child terms.
  8. Assign terms to at least two published entries.

One taxonomy can be enabled for multiple post types. Use that only when the vocabulary has the same meaning across all of them.

Connect presentation

After the structures exist:

  • Configure the custom post type’s single and archive behavior in its dynamic POM Theme Templates tab.
  • Build a single template for one entry.
  • Build an archive or feed template for listings.
  • Add subheader, breadcrumb, and sidebar behavior for the custom post type where required.
  • Use a saved query or Faceted Search only after real terms and field values exist.

Choose the URL relationship

Three independent controls affect URLs:

  1. The custom post type base under Settings → Permalinks → Custom post types.
  2. The taxonomy base under Settings → Permalinks → Custom taxonomies.
  3. Optional hierarchy features:

Do not enable an optional hierarchy until the normal post type and taxonomy URLs work.

Verify the complete relationship

Check:

  • The taxonomy appears in the intended editors.
  • Parent and child terms can be assigned.
  • Term archives contain the expected entries.
  • The custom post type archive and singles still resolve.
  • Templates handle an entry with no term and an empty term archive.
  • Breadcrumbs and canonical URLs match the chosen hierarchy.
  • Multilingual routes work in every active language.

If the taxonomy selector is present but an archive is empty, confirm the published entry is assigned to the exact term being viewed and that the archive has not been disabled.