For Developers
This section covers hooks, filters, CSS architecture, and JavaScript globals available for extending Monogram in a child theme or custom plugin.
#Action Hooks
Hook | Location | Parameters | Description |
|---|---|---|---|
| footer.php | - | Fires before the footer wrapper. Use to inject content above the footer. |
| page.php |
| Fires before page content output. |
| page.php |
| Fires after page content output. |
| portfolio/loop.php | - | Fires after the portfolio archive grid. |
#Example: Add content before footer
add_action('jkd_before_footer', function() {
echo '<div class="custom-cta">Contact us today!</div>';
});
#Filter Hooks
Filter | Default | Parameters | Description |
|---|---|---|---|
|
|
| CSS classes on page content wrapper |
|
|
| CSS classes on page header |
| Auto-detected |
| Page header title text |
|
|
| Page header subtitle |
|
|
| Footer wrapper CSS classes |
| Setting value |
| Footer tagline text |
| Setting value |
| Copyright text |
| Setting value |
| Social links array |
| Setting value |
| Footer contact information |
| Setting value |
| Navigation logo URL |
| Setting value |
| Nav CTA button arguments |
| Setting value |
| Nav social links |
|
|
| Max top-level menu items before overflow |
| AJAX data |
| Localized AJAX data passed to JS |
| Settings data |
| Localized settings passed to JS |
#Example: Change max menu items
add_filter('jkd_walker_max_items', function() {
return 9;
});#JavaScript Globals
Global | Description |
|---|---|
| Read Customizer setting. Supports URL param override for testing. |
| Returns true on mobile devices (768px breakpoint + UA check). Cached, resets on resize. |
| Trigger a sound effect programmatically. Names: hover, click, toggle, submit, open, close, success, error |
| Re-trigger lazy loading on newly injected DOM content |
| All Customizer settings object |
| WordPress AJAX endpoint URL |
#CSS Custom Properties
/* Border radius */
--jkd-br-sm: 5px;
--jkd-br-md: 8px;
--jkd-br-lg: 15px;
--jkd-br-xl: 50px;
/* Opacity */
--jkd-op-xl: 0.15;
--jkd-op-lg: 0.42;
--jkd-op-md: 0.62;
--jkd-op-sm: 0.82;
/* Transitions */
--jkd-tr-dr: 0.255s;
--jkd-tr-tp: cubic-bezier(0.4, 0, 0.2, 1);
/* Color scheme (set dynamically) */
--jkd-accent, --jkd-bg, --jkd-bg-secondary,
--jkd-text, --jkd-heading, --jkd-border#Child Theme
Install monogram-child.zip from the theme package. Override any template by copying it from the parent theme into the child theme, maintaining the directory structure.
Example: to override the portfolio single template, copy template-parts/portfolio/single.php to your child theme at the same path.
Never edit parent theme files directly. All customizations should go in your child theme or a custom plugin to survive theme updates.
Last updated
Was this article helpful?
Resources