dd_id_5c3f2f1d27
5. Documentation (Meta)
Theme: draconai
Table of Contents
Draconai
- Minimal WordPress theme used for DevDocs.
- Rendering uses Twig templates (
templates/*.twig) with thin PHP controllers. - Shared sidebar logic is centralized via
partials/sidebar-left.phpandpartials/sidebar-right.php(include-based reuse, no duplicated layout logic). - Top menu includes the default WordPress search bar at the far right (after the theme toggle).
- Search results render a dedicated results list with counts and snippets (
search.php). - Location:
server/var_www/devdocs_wp/wp-content/themes/draconai/. - Provides the layout styling and navigation for documentation pages.
- Includes a theme switcher toggle in the top menu (light/dark).
- Theme rendering bootstraps Twig through
dracon_twig_echoand a fallback bootstrap include if MU bootstrap was not loaded yet. - Section layers are pulled from the required
doc_layertaxonomy (fallback to legacy top-level slug mapping) and rendered as a colored header badge + left border (seeserver/var_www/devdocs_wp/wp-content/themes/draconai/functions.php). - The first word in the docs sidebar is "Docs"; it must show the latest update time next to it, e.g. "Docs (2023.12.12 12:12:55)" (format Y.m.d H:i:s, from the most recent page
post_modified). - Right sidebar starts with
docs_right_sidebarhook output (priority-based plugin injections, e.g. page-origin badge at the top).
Recreate From Scratch
Recreate
If the theme is deleted, recreate it using these requirements:
- Create a folder at
server/var_www/devdocs_wp/wp-content/themes/draconai/. - Add
style.csswith base layout styles (two sidebars, main content column, header, typography). - Add
functions.phpthat enqueuesstyle.css, registers thetop-menu, and renders through Twig. - Add
index.php,search.php,page-categories.php, andtaxonomy-doc_category.phpas thin controllers. - Add Twig templates under
templates/and include-based shared sidebar partials underpartials/. - Each template must output the layout shell only and trigger plugin hooks for dynamic sections:
docs_updated_timein the "Docs" sidebar heading.docs_sidebar_treefor the left tree.docs_breadcrumbsfor breadcrumbs.docs_layer_badgefor the layer badge.docs_categories_listfor per-page categories.docs_categories_sidebarfor the right sidebar categories list.docs_children_listfor the right sidebar children list.docs_search_resultsfor search results.docs_taxonomy_resultsfor taxonomy pages.docs_categories_indexfor the categories index page.
The theme must not call plugin functions directly; only use hooks.