39339-vm/wp-content/mu-plugins/coaching-mvp.php
2026-03-24 13:26:32 +00:00

2537 lines
96 KiB
PHP

<?php
/**
* Plugin Name: Coaching MVP Site Kit
* Description: Coaching site kit with booking requests, contact forms, testimonials, pages, and starter content.
*/
if (!defined('ABSPATH')) {
exit;
}
const COACHING_MVP_TEMPLATE_VERSION = '2.0.3';
function coaching_mvp_service_catalog() {
return [
'discovery-call' => [
'label' => 'Discovery Call',
'code' => '01',
'summary' => 'A low-friction first step for visitors who want to explore fit, goals, and next steps before committing.',
'bullets' => ['30 minutes', 'Ideal first conversation', 'Best for fit and direction'],
],
'clarity-session' => [
'label' => 'Clarity Session',
'code' => '02',
'summary' => 'A focused deep-dive session for transitions, decisions, leadership tension, and getting unstuck quickly.',
'bullets' => ['90-minute intensive', 'Decision support', 'Action summary included'],
],
'momentum-coaching' => [
'label' => 'Momentum Coaching',
'code' => '03',
'summary' => 'Ongoing coaching for clients who need accountability, calm execution, and stronger follow-through over time.',
'bullets' => ['Ongoing 1:1 rhythm', 'Reflection between sessions', 'Built for durable progress'],
],
'leadership-intensive' => [
'label' => 'Leadership Intensive',
'code' => '04',
'summary' => 'A premium strategy container for founders, executives, and senior leaders navigating a high-stakes season.',
'bullets' => ['Executive-level support', 'Complex challenges welcome', 'Clear implementation path'],
],
];
}
function coaching_mvp_services() {
$services = [];
foreach (coaching_mvp_service_catalog() as $slug => $service) {
$services[$slug] = $service['label'];
}
return $services;
}
function coaching_mvp_register_post_types() {
register_post_type('testimonial', [
'labels' => [
'name' => 'Testimonials',
'singular_name' => 'Testimonial',
'add_new_item' => 'Add New Testimonial',
'edit_item' => 'Edit Testimonial',
],
'public' => true,
'show_in_rest' => true,
'menu_icon' => 'dashicons-format-quote',
'supports' => ['title', 'editor', 'excerpt', 'page-attributes'],
'has_archive' => false,
'rewrite' => ['slug' => 'testimonial'],
]);
register_post_type('booking_request', [
'labels' => [
'name' => 'Bookings',
'singular_name' => 'Booking',
'add_new_item' => 'Add Booking',
'edit_item' => 'View Booking',
],
'public' => false,
'show_ui' => true,
'show_in_rest' => false,
'menu_icon' => 'dashicons-calendar-alt',
'supports' => ['title'],
'capability_type' => 'post',
'map_meta_cap' => true,
]);
register_post_type('lead_capture', [
'labels' => [
'name' => 'Leads',
'singular_name' => 'Lead',
'add_new_item' => 'Add Lead',
'edit_item' => 'View Lead',
],
'public' => false,
'show_ui' => true,
'show_in_rest' => false,
'menu_icon' => 'dashicons-email-alt2',
'supports' => ['title'],
'capability_type' => 'post',
'map_meta_cap' => true,
]);
}
add_action('init', 'coaching_mvp_register_post_types');
function coaching_mvp_body_class($classes) {
$classes[] = 'coaching-mvp-active';
return $classes;
}
add_filter('body_class', 'coaching_mvp_body_class');
function coaching_mvp_styles() {
if (is_admin()) {
return;
}
wp_register_style('coaching-mvp-inline', false, [], null);
wp_enqueue_style('coaching-mvp-inline');
$css = <<<'CSS'
:root {
--coach-primary: #5f2dff;
--coach-secondary: #00b8a9;
--coach-accent: #ff9f1c;
--coach-background: #f3f0ff;
--coach-surface: #ffffff;
--coach-surface-soft: rgba(255,255,255,.84);
--coach-text: #111b33;
--coach-muted: #566377;
--coach-deep: #0b1530;
--coach-deeper: #060d1f;
--coach-border: rgba(17,27,51,.11);
--coach-shadow: 0 24px 64px rgba(9,18,40,.10);
--coach-shadow-lg: 0 40px 100px rgba(6,13,31,.22);
--coach-shadow-card: 0 18px 40px rgba(9,18,40,.09);
--coach-shadow-hover: 0 28px 60px rgba(9,18,40,.14);
--coach-radius: 28px;
--coach-radius-sm: 18px;
--coach-spacing: 1.5rem;
}
body.coaching-mvp-active {
background:
radial-gradient(circle at 10% 8%, rgba(95,45,255,.14), transparent 26%),
radial-gradient(circle at 90% 10%, rgba(255,159,28,.12), transparent 22%),
radial-gradient(circle at 58% 36%, rgba(0,184,169,.08), transparent 28%),
linear-gradient(180deg, #eef2ff 0%, #f7f2ff 26%, #fdf6ec 56%, #ffffff 100%);
color: var(--coach-text);
}
body.coaching-mvp-active .wp-site-blocks,
body.coaching-mvp-active .site,
body.coaching-mvp-active main {
color: var(--coach-text);
}
body.coaching-mvp-active {
--coach-page-gutter: 20px;
--coach-content-max: 1280px;
--coach-wide-max: 1320px;
--wp--style--global--content-size: min(var(--coach-content-max), calc(100% - (var(--coach-page-gutter) * 2)));
--wp--style--global--wide-size: min(var(--coach-wide-max), calc(100% - (var(--coach-page-gutter) * 2)));
}
body.coaching-mvp-active .wp-block-post-content,
body.coaching-mvp-active .wp-block-query,
body.coaching-mvp-active .wp-block-group {
width: 100%;
}
body.coaching-mvp-active main.wp-block-group.has-global-padding,
body.coaching-mvp-active .entry-content.wp-block-post-content.has-global-padding,
body.coaching-mvp-active .coach-home-page,
body.coaching-mvp-active .coach-shell,
body.coaching-mvp-active .coach-shell > .wp-block-group__inner-container,
body.coaching-mvp-active .coach-section > .wp-block-group__inner-container {
box-sizing: border-box;
}
body.coaching-mvp-active main.wp-block-group.has-global-padding,
body.coaching-mvp-active .entry-content.wp-block-post-content.has-global-padding {
padding-left: var(--coach-page-gutter) !important;
padding-right: var(--coach-page-gutter) !important;
}
body.coaching-mvp-active main > .wp-block-group.alignfull.has-global-padding {
margin-left: 0 !important;
margin-right: 0 !important;
padding-left: 0 !important;
padding-right: 0 !important;
}
body.coaching-mvp-active .entry-content.wp-block-post-content.has-global-padding {
max-width: none !important;
}
body.coaching-mvp-active .entry-content.alignfull.wp-block-post-content.has-global-padding {
width: 100% !important;
margin-left: 0 !important;
margin-right: 0 !important;
}
body.coaching-mvp-active .coach-home-page,
body.coaching-mvp-active .coach-shell,
body.coaching-mvp-active .coach-shell > .wp-block-group__inner-container {
width: min(100%, var(--coach-content-max));
max-width: var(--coach-content-max);
margin-left: auto !important;
margin-right: auto !important;
}
body.coaching-mvp-active .coach-home-page > .wp-block-group__inner-container,
body.coaching-mvp-active .coach-shell > .wp-block-group__inner-container,
body.coaching-mvp-active .coach-section > .wp-block-group__inner-container {
padding-left: 0 !important;
padding-right: 0 !important;
}
body.coaching-mvp-active .coach-home-page > .wp-block-group__inner-container > :where(:not(.alignleft):not(.alignright):not(.alignfull)),
body.coaching-mvp-active .coach-shell > .wp-block-group__inner-container > :where(:not(.alignleft):not(.alignright):not(.alignfull)),
body.coaching-mvp-active .coach-section > .wp-block-group__inner-container > :where(:not(.alignleft):not(.alignright):not(.alignfull)),
body.coaching-mvp-active .coach-home-page > .wp-block-group__inner-container > .alignwide,
body.coaching-mvp-active .coach-shell > .wp-block-group__inner-container > .alignwide,
body.coaching-mvp-active .coach-section > .wp-block-group__inner-container > .alignwide,
body.coaching-mvp-active .coach-hero,
body.coaching-mvp-active .coach-section,
body.coaching-mvp-active .coach-stats-grid {
width: 100%;
max-width: 100%;
margin-left: 0 !important;
margin-right: 0 !important;
box-sizing: border-box;
}
body.coaching-mvp-active .wp-site-blocks {
overflow-x: clip;
}
body.coaching-mvp-active header.wp-block-template-part {
position: sticky;
top: 0;
z-index: 30;
backdrop-filter: blur(16px);
-webkit-backdrop-filter: blur(16px);
background: linear-gradient(180deg, rgba(255,255,255,.86), rgba(248,250,255,.78));
border-bottom: 1px solid rgba(91,79,247,.10);
box-shadow: 0 10px 28px rgba(31,41,55,.08);
}
body.coaching-mvp-active header.wp-block-template-part .wp-block-group.has-global-padding.is-layout-constrained {
padding-left: var(--coach-page-gutter) !important;
padding-right: var(--coach-page-gutter) !important;
}
body.coaching-mvp-active header.wp-block-template-part .wp-block-group.alignwide {
width: min(calc(100% - (var(--coach-page-gutter) * 2)), var(--coach-content-max));
max-width: var(--coach-content-max);
margin-left: auto !important;
margin-right: auto !important;
}
body.coaching-mvp-active .wp-block-site-title a,
body.coaching-mvp-active .wp-block-navigation a,
body.coaching-mvp-active .wp-block-navigation-item__content {
color: rgba(17,24,39,.84);
text-decoration: none;
}
body.coaching-mvp-active .wp-block-site-title a {
color: #111827;
}
body.coaching-mvp-active .wp-block-navigation .wp-block-navigation-item__content {
font-weight: 600;
transition: color .22s ease, opacity .22s ease;
}
body.coaching-mvp-active .wp-block-navigation .wp-block-navigation-item__content:hover,
body.coaching-mvp-active .wp-block-navigation .wp-block-navigation-item__content:focus {
color: var(--coach-color-primary);
}
body.coaching-mvp-active .wp-block-navigation .current-menu-item > a,
body.coaching-mvp-active .wp-block-navigation .current_page_item > a {
color: #24135f;
}
body.coaching-mvp-active .wp-block-button__link {
border-radius: 999px;
padding: .98rem 1.48rem;
font-weight: 800;
letter-spacing: -.01em;
text-decoration: none;
border: 1px solid rgba(95,45,255,.16);
box-shadow: 0 14px 30px rgba(95,45,255,.16);
transition: transform .22s ease, box-shadow .22s ease, background-color .22s ease, border-color .22s ease, color .22s ease, filter .22s ease;
}
body.coaching-mvp-active .wp-block-button__link:hover,
body.coaching-mvp-active .wp-block-button__link:focus-visible {
transform: translateY(-2px);
box-shadow: 0 20px 40px rgba(95,45,255,.20);
filter: saturate(1.03);
}
body.coaching-mvp-active .wp-block-button:not(.is-style-outline) > .wp-block-button__link {
background: linear-gradient(135deg, #5f2dff 0%, #7b4dff 52%, #00b8a9 100%);
color: #fff;
}
body.coaching-mvp-active .wp-block-button.is-style-outline > .wp-block-button__link {
background: rgba(255,255,255,.94);
border-color: rgba(95,45,255,.16);
color: var(--coach-deep);
}
body.coaching-mvp-active .wp-block-button.is-style-outline > .wp-block-button__link {
border-radius: 999px;
}
body.coaching-mvp-active .wp-block-post-title,
body.coaching-mvp-active h1,
body.coaching-mvp-active h2,
body.coaching-mvp-active h3,
body.coaching-mvp-active h4 {
letter-spacing: -.03em;
}
body.coaching-mvp-active.page .wp-block-post-title {
display: none;
}
body.coaching-mvp-active.page main > .wp-block-group.alignfull.has-global-padding {
padding-top: 0 !important;
}
.coach-shell,
.coach-hero,
.coach-section,
.coach-panel,
.coach-form-wrap,
.coach-service-card,
.coach-testimonial-card,
.coach-stat,
.coach-process-card,
.coach-mini-card,
.coach-faq-card,
.coach-story-card,
.coach-system-card,
.coach-blog-card,
.coach-quote-card,
.coach-visual-card {
border-radius: var(--coach-radius);
}
.coach-shell > * + * {
margin-top: clamp(1.5rem, 3vw, 2.5rem);
}
.coach-section {
position: relative;
margin-top: clamp(1.7rem, 4vw, 3rem);
padding: clamp(1.35rem, 3vw, 2rem);
background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(249,250,255,.88));
border: 1px solid rgba(255,255,255,.74);
box-shadow: 0 20px 52px rgba(9,18,40,.07);
backdrop-filter: blur(8px);
}
.coach-section::after {
content: "";
position: absolute;
inset: 0;
border-radius: inherit;
background: linear-gradient(135deg, rgba(95,45,255,.05), rgba(255,159,28,.03) 55%, rgba(0,184,169,.04));
pointer-events: none;
}
.coach-section > * {
position: relative;
z-index: 1;
}
.coach-hero {
position: relative;
overflow: hidden;
padding: clamp(2.2rem, 5vw, 4.35rem);
background:
radial-gradient(circle at 14% 18%, rgba(255,255,255,.12), transparent 14%),
radial-gradient(circle at 88% 16%, rgba(255,159,28,.22), transparent 22%),
radial-gradient(circle at 20% 64%, rgba(0,184,169,.18), transparent 26%),
radial-gradient(circle at 82% 78%, rgba(95,45,255,.22), transparent 28%),
linear-gradient(135deg, #081126 0%, #132a5f 40%, #24196b 72%, #5f2dff 100%);
border: 1px solid rgba(255,255,255,.08);
box-shadow: 0 26px 60px rgba(6,13,31,.20);
}
.coach-hero::before {
content: "";
position: absolute;
inset: auto -6% -20% 52%;
height: 320px;
background: radial-gradient(circle, rgba(255,255,255,.12), transparent 62%);
pointer-events: none;
}
.coach-hero::after {
content: "";
position: absolute;
inset: 1px;
border-radius: inherit;
border: 1px solid rgba(255,255,255,.08);
background: linear-gradient(135deg, rgba(255,255,255,.03), rgba(255,255,255,0));
pointer-events: none;
}
.coach-hero h1,
.coach-hero h2,
.coach-hero p,
.coach-hero li,
.coach-hero strong,
.coach-hero .coach-quote-card {
color: #fff;
}
.coach-hero .wp-block-buttons .wp-block-button__link,
.coach-cta-row .wp-block-button__link,
.coach-form-wrap button,
.coach-inline-link {
border-radius: 999px;
padding: .95rem 1.4rem;
font-weight: 700;
text-decoration: none;
}
.coach-eyebrow {
display: inline-flex;
align-items: center;
gap: .5rem;
padding: .52rem .98rem;
border-radius: 999px;
background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.08));
border: 1px solid rgba(255,255,255,.22);
box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 8px 18px rgba(6,13,31,.10);
font-size: .8rem;
letter-spacing: .08em;
text-transform: uppercase;
}
.coach-badge {
display: inline-flex;
align-items: center;
gap: .45rem;
padding: .46rem .88rem;
border-radius: 999px;
background: linear-gradient(135deg, rgba(95,45,255,.12), rgba(0,184,169,.08));
border: 1px solid rgba(95,45,255,.12);
color: var(--coach-deep);
font-size: .84rem;
font-weight: 800;
box-shadow: 0 8px 18px rgba(95,45,255,.08);
}
.coach-badge.dark {
background: rgba(255,255,255,.12);
color: #fff;
}
.coach-grid-2,
.coach-grid-3,
.coach-grid-4,
.coach-card-grid,
.coach-testimonial-grid,
.coach-process-grid,
.coach-story-grid,
.coach-faq-grid,
.coach-stats-grid,
.coach-mini-grid,
.coach-system-grid,
.coach-blog-grid,
.coach-visual-grid,
.coach-booking-layout {
display: grid;
gap: 1.2rem;
}
.coach-grid-2,
.coach-booking-layout { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.coach-grid-3,
.coach-card-grid,
.coach-testimonial-grid,
.coach-process-grid,
.coach-story-grid,
.coach-faq-grid,
.coach-mini-grid,
.coach-system-grid,
.coach-blog-grid,
.coach-visual-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.coach-grid-4,
.coach-stats-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.coach-panel,
.coach-service-card,
.coach-testimonial-card,
.coach-stat,
.coach-process-card,
.coach-mini-card,
.coach-faq-card,
.coach-story-card,
.coach-form-wrap,
.coach-system-card,
.coach-blog-card,
.coach-quote-card,
.coach-visual-card {
background: linear-gradient(180deg, rgba(255,255,255,.985), rgba(246,248,255,.95));
border: 1px solid rgba(95,45,255,.08);
box-shadow: var(--coach-shadow-card);
padding: 1.35rem;
transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.coach-panel:hover,
.coach-service-card:hover,
.coach-testimonial-card:hover,
.coach-stat:hover,
.coach-process-card:hover,
.coach-mini-card:hover,
.coach-faq-card:hover,
.coach-story-card:hover,
.coach-form-wrap:hover,
.coach-system-card:hover,
.coach-blog-card:hover,
.coach-visual-card:hover {
transform: translateY(-3px);
box-shadow: var(--coach-shadow-hover);
border-color: rgba(95,45,255,.14);
}
.coach-panel.soft,
.coach-quote-card,
.coach-visual-card.dark {
background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.06));
border-color: rgba(255,255,255,.14);
box-shadow: none;
}
.coach-quote-card {
color: #fff;
}
.coach-visual-card {
min-height: 140px;
}
.coach-visual-card h3,
.coach-visual-card p {
color: #fff;
}
.coach-hero-shell {
position: relative;
z-index: 1;
width: 100%;
max-width: 35rem;
margin-left: auto;
}
.coach-hero .wp-block-columns {
gap: clamp(1.4rem, 3.2vw, 3rem);
}
.coach-hero .wp-block-column {
min-width: 0;
}
.coach-photo-stack {
display: grid;
gap: 1rem;
}
.coach-photo-row {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 1rem;
}
.coach-photo-card {
margin: 0;
overflow: hidden;
padding: 0;
background: #dfe6f2;
border: 1px solid var(--coach-border);
box-shadow: var(--coach-shadow-lg);
}
.coach-photo-card img {
display: block;
width: 100%;
height: auto;
object-fit: cover;
}
.coach-photo-card-large img {
aspect-ratio: 16 / 11;
}
.coach-photo-card-medium img {
aspect-ratio: 1 / 1;
}
.coach-photo-card-tall img {
aspect-ratio: 4 / 5;
}
.coach-photo-feature {
align-items: center;
grid-template-columns: minmax(240px, .88fr) minmax(320px, 1.12fr);
}
.coach-photo-feature .coach-photo-card {
width: 100%;
max-width: 26rem;
justify-self: start;
align-self: center;
}
.coach-photo-feature .coach-photo-card img {
aspect-ratio: 6 / 5;
width: 100%;
height: auto;
max-height: 420px;
}
.coach-photo-copy {
align-self: center;
}
.coach-hero-media .coach-quote-card {
display: flex;
flex-direction: column;
justify-content: center;
min-height: 0;
}
.coach-hero .coach-photo-card {
background: rgba(255,255,255,.08);
border-color: rgba(255,255,255,.14);
}
.coach-hero-simple {
align-items: center;
}
.coach-hero-simple .wp-block-column:first-child > *:last-child {
margin-bottom: 0;
}
.coach-hero-simple .wp-block-column:last-child {
position: relative;
}
.coach-hero-image-wrap {
position: relative;
max-width: 34rem;
margin-left: auto;
}
.coach-hero-image-wrap .coach-photo-card {
border-radius: 32px;
overflow: hidden;
}
.coach-hero-image-wrap .coach-photo-card img {
aspect-ratio: 4 / 5;
min-height: 100%;
}
.coach-hero-note {
position: absolute;
left: -1.2rem;
bottom: 1.2rem;
max-width: 17rem;
padding: 1rem 1.05rem;
border-radius: 22px;
background: rgba(12, 21, 48, 0.84);
border: 1px solid rgba(255,255,255,.12);
box-shadow: 0 16px 38px rgba(7, 12, 28, .20);
backdrop-filter: blur(8px);
}
.coach-hero-note strong,
.coach-hero-note p {
color: #fff;
}
.coach-hero-note strong {
display: block;
font-size: 1rem;
margin-bottom: .35rem;
}
.coach-hero-note p {
margin: 0;
font-size: .94rem;
line-height: 1.5;
color: rgba(255,255,255,.82);
}
@media (max-width: 900px) {
.coach-hero-image-wrap {
max-width: none;
margin-left: 0;
}
.coach-hero-note {
position: static;
margin-top: 1rem;
max-width: none;
}
.coach-photo-feature {
grid-template-columns: 1fr;
}
.coach-photo-feature .coach-photo-card {
max-width: none;
}
.coach-photo-feature .coach-photo-card img {
max-height: none;
aspect-ratio: 4 / 3;
}
}
@media (max-width: 781px) {
.coach-photo-row {
grid-template-columns: 1fr;
}
}
.coach-system-card h3,
.coach-service-card h3,
.coach-process-card h3,
.coach-faq-card h3,
.coach-story-card h3,
.coach-testimonial-card h3,
.coach-mini-card h3,
.coach-blog-card h3 {
margin-top: .35rem;
margin-bottom: .6rem;
}
.coach-stat strong {
display: block;
font-size: clamp(1.4rem, 3vw, 2.15rem);
color: var(--coach-text);
}
.coach-stat span,
.coach-muted,
.coach-service-card p,
.coach-process-card p,
.coach-faq-card p,
.coach-story-card p,
.coach-system-card p,
.coach-blog-card p,
.coach-testimonial-meta,
.coach-form-wrap p,
.coach-section p,
.coach-quote-card p,
.coach-mini-card p {
color: var(--coach-muted);
}
.coach-hero .coach-panel p,
.coach-hero .coach-quote-card p,
.coach-hero .coach-visual-card p,
.coach-hero .coach-badge.dark + h3 + p {
color: rgba(255,255,255,.82);
}
.coach-service-card ul,
.coach-process-card ul,
.coach-story-card ul,
.coach-system-card ul {
margin: .8rem 0 0 1rem;
}
.coach-icon-dot {
display: inline-flex;
align-items: center;
justify-content: center;
width: 2.4rem;
height: 2.4rem;
border-radius: 50%;
background: linear-gradient(135deg, rgba(95,45,255,.20), rgba(255,159,28,.18) 55%, rgba(0,184,169,.16));
color: var(--coach-deep);
box-shadow: inset 0 1px 0 rgba(255,255,255,.52), 0 8px 18px rgba(95,45,255,.08);
font-weight: 800;
}
.coach-work-together-section {
position: relative;
overflow: hidden;
padding: clamp(1.45rem, 2.8vw, 2.15rem);
background:
radial-gradient(circle at 8% 14%, rgba(95,45,255,.10), transparent 24%),
radial-gradient(circle at 90% 12%, rgba(0,184,169,.09), transparent 23%),
linear-gradient(180deg, rgba(255,255,255,.98), rgba(244,247,255,.98));
border: 1px solid rgba(95,45,255,.08);
box-shadow: 0 24px 56px rgba(9,18,40,.07);
}
.coach-work-together-section::before {
content: "";
position: absolute;
inset: 0;
background: linear-gradient(135deg, rgba(255,255,255,.16), transparent 34%, rgba(95,45,255,.04));
pointer-events: none;
}
.coach-work-together-section > .wp-block-group__inner-container {
position: relative;
z-index: 1;
}
.coach-work-together-section .wp-block-heading,
.coach-work-together-section > .wp-block-group__inner-container > p:not(.coach-badge) {
max-width: 44rem;
}
.coach-work-grid {
gap: 1rem;
margin-top: 1.25rem;
grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
align-items: stretch;
}
.coach-work-grid .coach-system-card {
--work-accent: rgba(95,45,255,.20);
--work-accent-strong: #5f2dff;
position: relative;
isolation: isolate;
overflow: hidden;
min-height: 182px;
padding: 1.15rem 1.05rem 1.05rem;
border-radius: 22px;
background:
linear-gradient(180deg, rgba(255,255,255,.985), rgba(245,248,255,.98));
border: 1px solid rgba(95,45,255,.10);
box-shadow: 0 14px 28px rgba(9,18,40,.07);
transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.coach-work-grid .coach-system-card::before {
content: "";
position: absolute;
inset: 0 0 auto 0;
height: 3px;
background: linear-gradient(90deg, var(--work-accent-strong), color-mix(in srgb, var(--work-accent-strong) 20%, transparent));
opacity: .92;
}
.coach-work-grid .coach-system-card::after {
content: attr(data-icon);
position: absolute;
right: .65rem;
top: .35rem;
font-size: 4.8rem;
line-height: 1;
font-weight: 700;
color: color-mix(in srgb, var(--work-accent-strong) 17%, white 83%);
opacity: .75;
transform: rotate(-8deg);
pointer-events: none;
z-index: 0;
}
.coach-work-grid .coach-system-card > * {
position: relative;
z-index: 1;
}
.coach-work-grid .coach-system-card:nth-child(1) {
--work-accent: rgba(95,45,255,.20);
--work-accent-strong: #5f2dff;
}
.coach-work-grid .coach-system-card:nth-child(2) {
--work-accent: rgba(0,184,169,.20);
--work-accent-strong: #0e9f95;
}
.coach-work-grid .coach-system-card:nth-child(3) {
--work-accent: rgba(255,159,28,.22);
--work-accent-strong: #ff9f1c;
}
.coach-work-grid .coach-system-card:nth-child(4) {
--work-accent: rgba(222,87,137,.20);
--work-accent-strong: #d25488;
}
.coach-work-grid .coach-system-card:nth-child(5) {
--work-accent: rgba(56,120,255,.19);
--work-accent-strong: #2f6df6;
}
.coach-work-grid .coach-system-card:nth-child(6) {
--work-accent: rgba(19,140,114,.20);
--work-accent-strong: #138c72;
}
.coach-work-grid .coach-system-card:nth-child(7) {
--work-accent: rgba(125,93,255,.20);
--work-accent-strong: #7d5dff;
}
.coach-work-grid .coach-system-card:hover {
transform: translateY(-4px);
border-color: color-mix(in srgb, var(--work-accent-strong) 28%, white 72%);
box-shadow: 0 18px 36px rgba(9,18,40,.10);
}
.coach-work-grid .coach-icon-dot {
width: 2.5rem;
height: 2.5rem;
border-radius: 14px;
margin-bottom: .82rem;
background: linear-gradient(135deg, color-mix(in srgb, var(--work-accent-strong) 90%, white 10%), rgba(255,255,255,.96));
border: 1px solid rgba(255,255,255,.78);
box-shadow: inset 0 1px 0 rgba(255,255,255,.76), 0 10px 18px rgba(9,18,40,.07);
font-size: .81rem;
letter-spacing: .06em;
}
.coach-work-grid .coach-system-card h3 {
max-width: 12ch;
margin-top: 0;
margin-bottom: .48rem;
font-size: 1.06rem;
line-height: 1.2;
letter-spacing: -.02em;
color: #15113d;
}
.coach-work-grid .coach-system-card p {
max-width: 30ch;
margin-bottom: 0;
font-size: .92rem;
line-height: 1.5;
color: rgba(32,45,68,.82);
}
@media (max-width: 781px) {
.coach-work-together-section {
padding: 1.2rem;
}
.coach-work-grid {
grid-template-columns: 1fr;
}
.coach-work-grid .coach-system-card {
min-height: 0;
padding: 1.05rem 1rem 1rem;
}
.coach-work-grid .coach-system-card::after {
font-size: 4.1rem;
right: .5rem;
}
}
.coach-ways-section {
position: relative;
overflow: hidden;
padding: clamp(1.55rem, 3.3vw, 2.35rem);
background:
radial-gradient(circle at 10% 14%, rgba(255,255,255,.08), transparent 16%),
radial-gradient(circle at 88% 18%, rgba(255,159,28,.26), transparent 20%),
radial-gradient(circle at 18% 84%, rgba(0,184,169,.20), transparent 22%),
radial-gradient(circle at 82% 76%, rgba(120,92,255,.24), transparent 26%),
linear-gradient(135deg, #081126 0%, #141f4c 34%, #251a6f 68%, #5f2dff 100%);
border: 1px solid rgba(255,255,255,.08);
box-shadow: 0 32px 72px rgba(6,13,31,.24);
}
.coach-ways-section::after {
content: "";
position: absolute;
inset: 0;
border-radius: inherit;
background:
linear-gradient(120deg, rgba(255,255,255,.07), transparent 30%, transparent 70%, rgba(255,255,255,.04)),
repeating-linear-gradient(90deg, rgba(255,255,255,.04) 0 1px, transparent 1px 92px),
repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, transparent 1px 92px);
opacity: .42;
pointer-events: none;
}
.coach-ways-section > .wp-block-group__inner-container {
position: relative;
z-index: 1;
}
.coach-ways-section .coach-badge {
background: rgba(255,255,255,.12);
color: #fff;
border-color: rgba(255,255,255,.16);
box-shadow: 0 12px 24px rgba(6,13,31,.16);
}
.coach-ways-section .wp-block-heading {
max-width: 13ch;
color: #fff;
}
.coach-ways-stage {
position: relative;
overflow: hidden;
margin-top: 1.35rem;
padding: clamp(1.15rem, 2.2vw, 1.55rem);
border-radius: 30px;
background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.05));
border: 1px solid rgba(255,255,255,.14);
box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 26px 56px rgba(4,10,26,.24);
backdrop-filter: blur(18px);
isolation: isolate;
}
.coach-ways-stage::before {
content: "";
position: absolute;
inset: 0;
border-radius: inherit;
background: linear-gradient(135deg, rgba(255,255,255,.08), transparent 26%, rgba(255,159,28,.08) 62%, rgba(0,184,169,.09));
pointer-events: none;
}
.coach-ways-stage .coach-ways-ambient[data-depth] {
will-change: transform;
transform: translate3d(0, 0, 0);
}
.coach-ways-grid {
position: relative;
z-index: 1;
display: grid;
grid-template-columns: minmax(240px, .82fr) minmax(0, 1.45fr);
gap: 1.1rem;
align-items: start;
}
.coach-ways-copy {
position: relative;
align-self: start;
padding: 1.2rem 1.15rem;
border-radius: 24px;
background: linear-gradient(180deg, rgba(9,16,38,.42), rgba(9,16,38,.20));
border: 1px solid rgba(255,255,255,.12);
box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.coach-ways-kicker {
display: inline-block;
margin-bottom: .82rem;
color: rgba(255,255,255,.72);
font-size: .76rem;
font-weight: 800;
letter-spacing: .14em;
text-transform: uppercase;
}
.coach-ways-copy p {
margin: 0 0 1rem;
max-width: 31ch;
color: rgba(255,255,255,.86);
}
.coach-ways-signal-bar {
display: flex;
flex-wrap: wrap;
gap: .55rem;
}
.coach-ways-signal-bar span {
display: inline-flex;
align-items: center;
padding: .44rem .7rem;
border-radius: 999px;
background: rgba(255,255,255,.10);
border: 1px solid rgba(255,255,255,.12);
color: rgba(255,255,255,.90);
font-size: .76rem;
font-weight: 700;
letter-spacing: .02em;
}
.coach-ways-cards {
position: relative;
z-index: 1;
min-width: 0;
align-self: start;
}
.coach-ways-cards .coach-card-grid {
margin: 0;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 1rem;
align-items: stretch;
grid-auto-rows: 1fr;
}
.coach-ways-section .coach-service-card {
--ways-accent: #9b7bff;
position: relative;
display: flex;
flex-direction: column;
align-self: stretch;
overflow: hidden;
padding: 1.1rem 1.05rem 1rem;
min-height: 0;
height: 100%;
background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.08));
border: 1px solid rgba(255,255,255,.14);
box-shadow: 0 18px 38px rgba(4,10,26,.22);
backdrop-filter: blur(16px);
}
.coach-ways-section .coach-service-card::before {
content: "";
position: absolute;
inset: 0 0 auto 0;
height: 4px;
background: linear-gradient(90deg, var(--ways-accent), color-mix(in srgb, var(--ways-accent) 18%, transparent));
}
.coach-ways-section .coach-service-card::after {
content: "◌";
position: absolute;
right: .82rem;
top: .42rem;
font-size: 4rem;
line-height: 1;
font-weight: 700;
color: color-mix(in srgb, var(--ways-accent) 42%, white 58%);
opacity: .24;
transform: rotate(-10deg);
pointer-events: none;
}
.coach-ways-section .coach-service-card:nth-child(1) {
--ways-accent: #b08dff;
}
.coach-ways-section .coach-service-card:nth-child(1)::after {
content: "◌";
}
.coach-ways-section .coach-service-card:nth-child(2) {
--ways-accent: #23d3c0;
}
.coach-ways-section .coach-service-card:nth-child(2)::after {
content: "✦";
}
.coach-ways-section .coach-service-card:nth-child(3) {
--ways-accent: #ffb347;
}
.coach-ways-section .coach-service-card:nth-child(3)::after {
content: "∞";
}
.coach-ways-section .coach-service-card:hover {
transform: translateY(-4px);
border-color: color-mix(in srgb, var(--ways-accent) 44%, white 56%);
box-shadow: 0 26px 50px rgba(4,10,26,.26);
}
.coach-ways-section .coach-service-card > *,
.coach-ways-section .coach-mini-card > *,
.coach-ways-copy > * {
position: relative;
z-index: 1;
}
.coach-ways-section .coach-service-card h3,
.coach-ways-section .coach-service-card p,
.coach-ways-section .coach-service-card li,
.coach-ways-section .coach-mini-card h3,
.coach-ways-section .coach-mini-card p {
color: #fff;
}
.coach-ways-section .coach-service-card h3 {
margin-bottom: .5rem;
max-width: 10ch;
font-size: 1.08rem;
}
.coach-ways-section .coach-service-card p {
color: rgba(255,255,255,.84);
}
.coach-ways-section .coach-service-card .coach-icon-dot {
width: 2.6rem;
height: 2.6rem;
margin-bottom: .85rem;
border-radius: 14px;
background: linear-gradient(135deg, color-mix(in srgb, var(--ways-accent) 82%, white 18%), rgba(255,255,255,.96));
color: #101634;
border: 1px solid rgba(255,255,255,.78);
box-shadow: inset 0 1px 0 rgba(255,255,255,.82), 0 12px 22px rgba(4,10,26,.16);
}
.coach-ways-section .coach-service-card ul {
list-style: none;
margin: auto 0 0;
padding: .95rem 0 0;
display: flex;
flex-wrap: wrap;
gap: .48rem;
}
.coach-ways-section .coach-service-card li {
margin: 0;
padding: .42rem .66rem;
border-radius: 999px;
background: rgba(255,255,255,.10);
border: 1px solid rgba(255,255,255,.12);
color: rgba(255,255,255,.92);
font-size: .77rem;
line-height: 1.25;
}
.coach-ways-mini-grid {
position: relative;
z-index: 1;
margin-top: clamp(1.95rem, 3.4vw, 2.45rem);
padding: clamp(1.18rem, 2.2vw, 1.45rem);
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: .9rem;
border-top: 1px solid rgba(255,255,255,.14);
border: 1px solid rgba(255,255,255,.10);
border-radius: 24px;
background: linear-gradient(180deg, rgba(8,15,35,.16), rgba(255,255,255,.04));
box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.coach-ways-mini-grid .coach-mini-card {
position: relative;
overflow: hidden;
padding: 1.02rem 1rem 1rem;
background: linear-gradient(180deg, rgba(9,16,38,.34), rgba(255,255,255,.07));
border: 1px solid rgba(255,255,255,.12);
box-shadow: 0 16px 34px rgba(4,10,26,.18);
}
.coach-ways-mini-grid .coach-mini-card::before {
content: "";
position: absolute;
inset: 0;
background: linear-gradient(135deg, rgba(255,255,255,.06), transparent 55%);
pointer-events: none;
}
.coach-ways-mini-icon {
display: inline-flex;
align-items: center;
justify-content: center;
width: 2.2rem;
height: 2.2rem;
margin-bottom: .76rem;
border-radius: 14px;
background: linear-gradient(135deg, rgba(255,255,255,.26), rgba(255,255,255,.10));
border: 1px solid rgba(255,255,255,.18);
box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 10px 22px rgba(4,10,26,.14);
color: #fff;
font-size: 1rem;
}
.coach-ways-mini-grid .coach-mini-card p {
color: rgba(255,255,255,.80);
}
.coach-ways-ambient {
position: absolute;
border-radius: 999px;
pointer-events: none;
z-index: 0;
}
.coach-ways-ambient-a {
top: -60px;
right: -58px;
width: 260px;
height: 260px;
background: radial-gradient(circle, rgba(255,159,28,.40), transparent 66%);
filter: blur(8px);
}
.coach-ways-ambient-b {
left: -72px;
bottom: -40px;
width: 240px;
height: 240px;
background: radial-gradient(circle, rgba(0,184,169,.30), transparent 68%);
filter: blur(10px);
}
.coach-ways-ambient-c {
left: 34%;
top: 28%;
width: 420px;
height: 420px;
background: radial-gradient(circle, rgba(255,255,255,.12), transparent 60%);
mix-blend-mode: screen;
opacity: .72;
}
@media (max-width: 960px) {
.coach-ways-grid {
grid-template-columns: 1fr;
}
.coach-ways-cards .coach-card-grid,
.coach-ways-mini-grid {
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.coach-ways-copy p {
max-width: 44ch;
}
}
@media (max-width: 781px) {
.coach-ways-section {
padding: 1.25rem;
}
.coach-ways-section .wp-block-heading {
max-width: 11ch;
}
.coach-ways-stage {
padding: 1rem;
border-radius: 24px;
}
.coach-ways-cards .coach-card-grid,
.coach-ways-mini-grid {
grid-template-columns: 1fr;
}
.coach-ways-section .coach-service-card,
.coach-ways-mini-grid .coach-mini-card,
.coach-ways-copy {
padding: 1rem;
}
.coach-ways-section .coach-service-card::after {
font-size: 3.3rem;
right: .7rem;
}
}
.coach-form-wrap {
padding: 1.55rem;
background: linear-gradient(180deg, rgba(255,255,255,.99), rgba(241,245,255,.96));
}
.coach-form-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
gap: 1rem;
}
.coach-form-grid .full {
grid-column: 1 / -1;
}
.coach-form-wrap label {
display: block;
font-weight: 700;
margin-bottom: .4rem;
color: var(--coach-text);
}
.coach-form-wrap input,
.coach-form-wrap textarea,
.coach-form-wrap select {
width: 100%;
border: 1px solid rgba(20,32,51,.12);
border-radius: 16px;
padding: .9rem 1rem;
font-size: 1rem;
background: #fff;
color: var(--coach-text);
box-shadow: inset 0 1px 2px rgba(13,21,48,.03);
transition: border-color .18s ease, box-shadow .18s ease;
}
.coach-form-wrap input:focus,
.coach-form-wrap textarea:focus,
.coach-form-wrap select:focus {
outline: none;
border-color: rgba(95,45,255,.42);
box-shadow: 0 0 0 3px rgba(95,45,255,.10), 0 8px 18px rgba(95,45,255,.06);
}
.coach-form-wrap textarea {
min-height: 140px;
}
.coach-form-wrap button {
border: 0;
background: linear-gradient(135deg, var(--coach-primary), #7b4dff 56%, var(--coach-secondary));
color: #fff;
cursor: pointer;
box-shadow: 0 16px 30px rgba(95,45,255,.20);
transition: transform .22s ease, box-shadow .22s ease, filter .22s ease;
}
.coach-form-wrap button:hover,
.coach-form-wrap button:focus-visible {
transform: translateY(-2px);
box-shadow: 0 22px 38px rgba(95,45,255,.22);
filter: saturate(1.03);
}
.coach-alert {
border-radius: 16px;
padding: .95rem 1rem;
margin-bottom: 1rem;
font-weight: 600;
}
.coach-alert.success {
background: rgba(19,199,184,.12);
color: #0e7067;
border: 1px solid rgba(19,199,184,.2);
}
.coach-alert.error {
background: rgba(255,107,129,.10);
color: #8d2d3b;
border: 1px solid rgba(255,107,129,.18);
}
.coach-testimonial-grid blockquote {
margin: 0;
}
.coach-testimonial-card .coach-rating {
color: #f5a524;
letter-spacing: .18em;
font-size: .95rem;
margin-bottom: .7rem;
}
.coach-cta-band {
padding: 1.85rem;
background:
radial-gradient(circle at 86% 18%, rgba(255,159,28,.16), transparent 22%),
radial-gradient(circle at 14% 78%, rgba(0,184,169,.12), transparent 24%),
linear-gradient(135deg, rgba(95,45,255,.10), rgba(0,184,169,.07)),
linear-gradient(180deg, rgba(255,255,255,.98), rgba(249,250,255,.96));
border: 1px solid rgba(95,45,255,.14);
border-radius: var(--coach-radius);
box-shadow: 0 22px 54px rgba(9,18,40,.08);
}
.coach-stack > * + * {
margin-top: 1rem;
}
.coach-inline-link {
display: inline-flex;
align-items: center;
justify-content: center;
color: var(--coach-deep);
background: linear-gradient(135deg, rgba(95,45,255,.10), rgba(0,184,169,.08));
border: 1px solid rgba(95,45,255,.12);
box-shadow: 0 10px 22px rgba(95,45,255,.08);
transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, filter .2s ease;
}
.coach-inline-link:hover,
.coach-inline-link:focus-visible {
transform: translateY(-2px);
box-shadow: 0 14px 28px rgba(95,45,255,.10);
filter: saturate(1.03);
}
.coach-admin-link {
display: inline-flex;
align-items: center;
gap: .5rem;
margin-top: .5rem;
color: var(--coach-primary);
text-decoration: none;
font-weight: 700;
}
.coach-footer-note {
text-align: center;
color: var(--coach-muted);
font-size: .95rem;
margin-top: 2rem;
}
.coach-blog-card a,
.coach-blog-card .wp-block-post-excerpt__more-link,
.wp-block-post-excerpt__more-link,
.wp-block-read-more {
color: var(--coach-primary);
font-weight: 700;
text-decoration: none;
}
body.coaching-mvp-active .wp-block-post-template {
gap: 1.2rem;
}
body.coaching-mvp-active .wp-block-post-template > li,
body.coaching-mvp-active .wp-block-post {
border-radius: var(--coach-radius);
background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.92));
border: 1px solid var(--coach-border);
box-shadow: var(--coach-shadow-card);
padding: 1.25rem;
}
body.coaching-mvp-active .wp-block-post-featured-image img {
border-radius: 18px;
}
body.coaching-mvp-active .wp-block-query-title,
body.coaching-mvp-active .wp-block-post-title a {
color: var(--coach-text);
text-decoration: none;
}
body.coaching-mvp-active .wp-block-query-pagination {
margin-top: 1.2rem;
}
body.coaching-mvp-active .wp-block-query-pagination a {
color: var(--coach-primary);
text-decoration: none;
}
@media (max-width: 781px) {
.coach-hero { padding: 1.5rem; }
body.coaching-mvp-active header.wp-block-template-part { position: static; }
}
CSS;
wp_add_inline_style('coaching-mvp-inline', $css);
}
add_action('wp_enqueue_scripts', 'coaching_mvp_styles');
function coaching_mvp_scripts() {
if (is_admin()) {
return;
}
$js = <<<'JS'
(function () {
if (window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
return;
}
const roots = document.querySelectorAll('[data-parallax-root]');
if (!roots.length) {
return;
}
const clamp = (value, min, max) => Math.max(min, Math.min(max, value));
roots.forEach((root) => {
const layers = Array.from(root.querySelectorAll('.coach-ways-ambient[data-depth]'));
if (!layers.length) {
return;
}
const state = { mx: 0, my: 0, ticking: false };
const render = () => {
state.ticking = false;
const rect = root.getBoundingClientRect();
const vh = window.innerHeight || 1;
const progress = clamp((vh * 0.58 - (rect.top + rect.height * 0.5)) / vh, -1.2, 1.2);
layers.forEach((layer) => {
const depth = parseFloat(layer.getAttribute('data-depth') || '0');
const moveX = state.mx * depth * 28;
const moveY = progress * depth * -88 + state.my * depth * 18;
layer.style.transform = `translate3d(${moveX.toFixed(2)}px, ${moveY.toFixed(2)}px, 0)`;
});
};
const queue = () => {
if (state.ticking) {
return;
}
state.ticking = true;
window.requestAnimationFrame(render);
};
root.addEventListener('pointermove', (event) => {
const rect = root.getBoundingClientRect();
state.mx = clamp((event.clientX - rect.left) / rect.width - 0.5, -0.5, 0.5);
state.my = clamp((event.clientY - rect.top) / rect.height - 0.5, -0.5, 0.5);
queue();
});
root.addEventListener('pointerleave', () => {
state.mx = 0;
state.my = 0;
queue();
});
window.addEventListener('scroll', queue, { passive: true });
window.addEventListener('resize', queue);
queue();
});
})();
JS;
wp_register_script('coaching-mvp-effects', false, [], null, true);
wp_enqueue_script('coaching-mvp-effects');
wp_add_inline_script('coaching-mvp-effects', $js);
}
add_action('wp_enqueue_scripts', 'coaching_mvp_scripts');
function coaching_mvp_home_content() {
return <<<'HTML'
<!-- wp:group {"className":"coach-home-page coach-shell","layout":{"type":"constrained"}} -->
<div class="wp-block-group coach-home-page coach-shell"><div class="wp-block-group__inner-container">
<!-- wp:group {"align":"wide","className":"coach-hero"} -->
<div class="wp-block-group alignwide coach-hero">
<!-- wp:columns {"verticalAlignment":"center"} -->
<div class="wp-block-columns are-vertically-aligned-center">
<!-- wp:column {"verticalAlignment":"center","width":"54%"} -->
<div class="wp-block-column is-vertically-aligned-center" style="flex-basis:54%">
<!-- wp:paragraph {"className":"coach-eyebrow"} -->
<p class="coach-eyebrow">Premium Coaching Template • Booking-first architecture</p>
<!-- /wp:paragraph -->
<!-- wp:heading {"level":1,"fontSize":"xx-large"} -->
<h1 class="wp-block-heading has-xx-large-font-size">A premium coaching template that future AI models can customize without rebuilding the foundation.</h1>
<!-- /wp:heading -->
<!-- wp:paragraph {"fontSize":"large"} -->
<p class="has-large-font-size">This starter is built to feel like a paid template: strong hero, real booking flow, editable services, dynamic testimonials, simple WordPress blog, and lead capture already wired into the conversion path.</p>
<!-- /wp:paragraph -->
<!-- wp:buttons -->
<div class="wp-block-buttons"><!-- wp:button {"backgroundColor":"contrast-3","textColor":"base"} -->
<div class="wp-block-button"><a class="wp-block-button__link has-base-color has-contrast-3-background-color has-text-color has-background wp-element-button" href="/book-session/">Book Session</a></div>
<!-- /wp:button -->
<!-- wp:button {"className":"is-style-outline"} -->
<div class="wp-block-button is-style-outline"><a class="wp-block-button__link wp-element-button" href="/services/">Explore Services</a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons -->
<!-- wp:list -->
<ul><li>Reusable template shell, not a one-off personal brand site</li><li>All must-have pages for coaching offers are already structured</li><li>Future customization can focus on niche, voice, offer, and visuals</li></ul>
<!-- /wp:list -->
</div>
<!-- /wp:column -->
<!-- wp:column {"verticalAlignment":"center","width":"46%"} -->
<div class="wp-block-column is-vertically-aligned-center" style="flex-basis:46%">
<!-- wp:html -->
<div class="coach-hero-shell coach-stack">
<div class="coach-quote-card">
<span class="coach-badge dark">Template objective</span>
<h3>Start from a premium base, then tailor it for the next coaching client.</h3>
<p>Replace the story, offer names, testimonials, and palette later — keep the expensive-looking structure now.</p>
</div>
<div class="coach-visual-grid">
<div class="coach-visual-card dark"><span class="coach-badge dark">Booking live</span><h3>Pay-later booking flow</h3><p>Requests are stored in WordPress admin for manual follow-up.</p></div>
<div class="coach-visual-card dark"><span class="coach-badge dark">Social proof</span><h3>Editable testimonials system</h3><p>Homepage and testimonials page both pull from the same content type.</p></div>
<div class="coach-visual-card dark"><span class="coach-badge dark">Content engine</span><h3>Simple core blog</h3><p>WordPress posts are already positioned as the lightweight content layer.</p></div>
</div>
</div>
<!-- /wp:html -->
</div>
<!-- /wp:column --></div>
<!-- /wp:columns -->
</div>
<!-- /wp:group -->
<!-- wp:html -->
<section class="coach-section coach-stats-grid">
<div class="coach-stat"><strong>1:1</strong><span>Private coaching space tailored to your goals, pace, and leadership context.</span></div>
<div class="coach-stat"><strong>Virtual</strong><span>Sessions designed to fit demanding schedules across time zones and work rhythms.</span></div>
<div class="coach-stat"><strong>Focused</strong><span>Each conversation ends with clearer priorities, stronger decisions, and practical next steps.</span></div>
<div class="coach-stat"><strong>Grounded</strong><span>Support rooted in real conversations, real pressure, and real professional transitions.</span></div>
</section>
<!-- /wp:html -->
<!-- wp:group {"className":"coach-section","layout":{"type":"constrained"}} -->
<div class="wp-block-group coach-section coach-work-together-section"><div class="wp-block-group__inner-container">
<!-- wp:paragraph {"className":"coach-badge"} -->
<p class="coach-badge">How we can work together</p>
<!-- /wp:paragraph -->
<!-- wp:heading -->
<h2 class="wp-block-heading">Coaching support for leadership, transitions, and high-pressure moments</h2>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p>Whether you need space to think strategically, prepare for a difficult conversation, or navigate a major transition, the work is designed to help you move forward with more clarity and steadiness.</p>
<!-- /wp:paragraph -->
<!-- wp:html -->
<div class="coach-system-grid coach-work-grid">
<article class="coach-system-card" data-icon="✦"><span class="coach-icon-dot">01</span><h3>Leadership clarity</h3><p>Step back from the noise, identify what matters most, and lead with stronger intention.</p></article>
<article class="coach-system-card" data-icon="↗"><span class="coach-icon-dot">02</span><h3>Decision support</h3><p>Work through complex choices with a calm, structured process that reduces second-guessing.</p></article>
<article class="coach-system-card" data-icon="◇"><span class="coach-icon-dot">03</span><h3>Career transitions</h3><p>Navigate promotions, role changes, pivots, and new responsibilities with more confidence.</p></article>
<article class="coach-system-card" data-icon="∿"><span class="coach-icon-dot">04</span><h3>Communication &amp; presence</h3><p>Strengthen how you show up in conversations, meetings, feedback, and high-stakes moments.</p></article>
<article class="coach-system-card" data-icon="◎"><span class="coach-icon-dot">05</span><h3>Team dynamics</h3><p>Untangle friction, improve collaboration, and lead people with more steadiness and care.</p></article>
<article class="coach-system-card" data-icon="⟲"><span class="coach-icon-dot">06</span><h3>Burnout prevention</h3><p>Build more sustainable ways of working without losing ambition, standards, or momentum.</p></article>
<article class="coach-system-card" data-icon="∞"><span class="coach-icon-dot">07</span><h3>Ongoing support</h3><p>Create a consistent space for reflection, accountability, and practical growth over time.</p></article>
</div>
<!-- /wp:html -->
</div></div>
<!-- /wp:group -->
<!-- wp:group {"className":"coach-section coach-ways-section","layout":{"type":"constrained"}} -->
<div class="wp-block-group coach-section coach-ways-section"><div class="wp-block-group__inner-container">
<!-- wp:paragraph {"className":"coach-badge dark"} -->
<p class="coach-badge dark">Ways to work together</p>
<!-- /wp:paragraph -->
<!-- wp:heading -->
<h2 class="wp-block-heading">Choose the level of support that fits this season</h2>
<!-- /wp:heading -->
<!-- wp:html -->
<div class="coach-ways-stage" data-parallax-root>
<div class="coach-ways-ambient coach-ways-ambient-a" aria-hidden="true" data-depth="0.12"></div>
<div class="coach-ways-ambient coach-ways-ambient-b" aria-hidden="true" data-depth="0.18"></div>
<div class="coach-ways-ambient coach-ways-ambient-c" aria-hidden="true" data-depth="0.08"></div>
<div class="coach-ways-grid">
<div class="coach-ways-copy">
<span class="coach-ways-kicker">Choose light entry, focused depth, or steady ongoing support</span>
<p>Instead of one generic offer, this section helps visitors feel the difference between exploration, quick traction, and a longer-term coaching rhythm.</p>
<div class="coach-ways-signal-bar">
<span>Explore fit</span>
<span>Get unstuck</span>
<span>Stay supported</span>
</div>
</div>
<div class="coach-ways-cards">
<!-- /wp:html -->
<!-- wp:shortcode -->
[coaching_services limit="3"]
<!-- /wp:shortcode -->
<!-- wp:html -->
</div>
</div>
<div class="coach-mini-grid coach-ways-mini-grid">
<div class="coach-mini-card"><span class="coach-ways-mini-icon">◌</span><h3>For first conversations</h3><p>Start with a low-pressure call if you want to explore fit, goals, and what kind of support would help most.</p></div>
<div class="coach-mini-card"><span class="coach-ways-mini-icon">✦</span><h3>For focused momentum</h3><p>Book a deeper session when you need clarity around a decision, transition, or leadership challenge.</p></div>
<div class="coach-mini-card"><span class="coach-ways-mini-icon">∞</span><h3>For ongoing support</h3><p>Choose a longer-term rhythm if you want reflection, accountability, and steady progress over time.</p></div>
</div>
</div>
<!-- /wp:html -->
</div></div>
<!-- /wp:group -->
<!-- wp:group {"className":"coach-section","layout":{"type":"constrained"}} -->
<div class="wp-block-group coach-section"><div class="wp-block-group__inner-container">
<!-- wp:html -->
<div class="coach-cta-band coach-grid-2">
<div>
<span class="coach-badge">Ready to begin?</span>
<h2>Take the next step in a way that feels clear and manageable</h2>
<p>If you already know you want support, book a session. If you have questions first, the services page will help you choose the right starting point.</p>
<p><a class="coach-inline-link" href="/book-session/">Book a session</a> <a class="coach-inline-link" href="/services/" style="margin-left:.5rem">View services</a></p>
</div>
<div class="coach-process-grid">
<article class="coach-process-card"><span class="coach-icon-dot">1</span><h3>Choose a starting point</h3><p>Select the option that matches your current challenge, level of urgency, and preferred pace.</p></article>
<article class="coach-process-card"><span class="coach-icon-dot">2</span><h3>Share your context</h3><p>Use the booking form to outline what is happening, what feels stuck, and what kind of support you need.</p></article>
<article class="coach-process-card"><span class="coach-icon-dot">3</span><h3>Move forward with clarity</h3><p>You will leave with clearer next steps, stronger perspective, and a more grounded plan for what comes next.</p></article>
</div>
</div>
<!-- /wp:html -->
</div></div>
<!-- /wp:group -->
<!-- wp:group {"className":"coach-section","layout":{"type":"constrained"}} -->
<div class="wp-block-group coach-section"><div class="wp-block-group__inner-container">
<!-- wp:paragraph {"className":"coach-badge"} -->
<p class="coach-badge">About the work</p>
<!-- /wp:paragraph -->
<!-- wp:heading -->
<h2 class="wp-block-heading">Grounded, strategic coaching for people carrying real responsibility</h2>
<!-- /wp:heading -->
<!-- wp:html -->
<div class="coach-grid-2">
<div class="coach-panel">
<h3>A calm space for honest thinking</h3>
<p>This work is designed for moments when the pressure is high, the stakes are real, and quick answers are not enough. Coaching creates room to sort signal from noise, make stronger decisions, and move forward in a way that feels aligned.</p>
<p><a class="coach-inline-link" href="/about/">Learn more about the approach</a></p>
</div>
<div class="coach-story-grid">
<article class="coach-story-card"><h3>Clarity</h3><p>Make sense of competing priorities, difficult choices, and the patterns that keep pulling attention in too many directions.</p></article>
<article class="coach-story-card"><h3>Presence</h3><p>Strengthen communication, steadiness, and self-trust so you can lead with more intention under pressure.</p></article>
<article class="coach-story-card"><h3>Momentum</h3><p>Turn reflection into practical next steps that feel realistic, thoughtful, and sustainable over time.</p></article>
</div>
</div>
<!-- /wp:html -->
</div></div>
<!-- /wp:group -->
<!-- wp:group {"className":"coach-section","layout":{"type":"constrained"}} -->
<div class="wp-block-group coach-section"><div class="wp-block-group__inner-container">
<!-- wp:paragraph {"className":"coach-badge"} -->
<p class="coach-badge">Client reflections</p>
<!-- /wp:paragraph -->
<!-- wp:heading -->
<h2 class="wp-block-heading">What clients often take away from this work</h2>
<!-- /wp:heading -->
<!-- wp:shortcode -->
[coaching_testimonials limit="3"]
<!-- /wp:shortcode -->
</div></div>
<!-- /wp:group -->
<!-- wp:group {"className":"coach-section","layout":{"type":"constrained"}} -->
<div class="wp-block-group coach-section"><div class="wp-block-group__inner-container">
<!-- wp:paragraph {"className":"coach-badge"} -->
<p class="coach-badge">Insights & articles</p>
<!-- /wp:paragraph -->
<!-- wp:heading -->
<h2 class="wp-block-heading">Short reflections on clarity, leadership, and sustainable momentum</h2>
<!-- /wp:heading -->
<!-- wp:shortcode -->
[coaching_recent_posts limit="3"]
<!-- /wp:shortcode -->
</div></div>
<!-- /wp:group -->
<!-- wp:group {"className":"coach-section","layout":{"type":"constrained"}} -->
<div class="wp-block-group coach-section"><div class="wp-block-group__inner-container">
<!-- wp:html -->
<div class="coach-cta-band coach-grid-2">
<div>
<span class="coach-badge">Get in touch</span>
<h2>Not sure where to start?</h2>
<p>If you have a question, want help choosing the right format, or prefer a gentler first step, send a note and we can begin there.</p>
<p><a class="coach-inline-link" href="/contact/">Visit the contact page</a></p>
</div>
<div>[coaching_lead_form]</div>
</div>
<!-- /wp:html -->
</div></div>
<!-- /wp:group -->
<!-- wp:paragraph {"className":"coach-footer-note"} -->
<p class="coach-footer-note">The aim is simple: create a calm, credible place where the right clients can quickly understand the work and take a confident next step.</p>
<!-- /wp:paragraph -->
</div></div>
<!-- /wp:group -->
HTML;
}
function coaching_mvp_services_content() {
return <<<'HTML'
<!-- wp:group {"className":"coach-shell","layout":{"type":"constrained"}} -->
<div class="wp-block-group coach-shell"><div class="wp-block-group__inner-container">
<!-- wp:paragraph {"className":"coach-badge"} --><p class="coach-badge">Coaching services</p><!-- /wp:paragraph -->
<!-- wp:heading {"level":1} --><h1 class="wp-block-heading">Support designed for clarity, change, and steady momentum</h1><!-- /wp:heading -->
<!-- wp:paragraph {"fontSize":"large"} --><p class="has-large-font-size">Whether you need one focused conversation or a longer coaching partnership, each offer is designed to create calm, honest progress.</p><!-- /wp:paragraph -->
<!-- wp:shortcode -->
[coaching_services limit="4"]
<!-- /wp:shortcode -->
<!-- wp:html -->
<div class="coach-grid-2 coach-section">
<div class="coach-panel">
<span class="coach-badge">Who this is for</span>
<h3>For leaders, founders, professionals, and people in transition</h3>
<p>These offers work well for moments that call for clearer thinking, stronger decision-making, more grounded leadership, or a steadier way of moving through change.</p>
</div>
<div class="coach-panel">
<span class="coach-badge">What to expect</span>
<h3>Choose the level of support that matches the moment</h3>
<p>Some people need a single strategic conversation. Others want structured support over time. Each option is meant to make the next step feel simple and clear.</p>
</div>
</div>
<div class="coach-process-grid coach-section">
<article class="coach-process-card"><span class="coach-icon-dot">01</span><h3>Name what matters</h3><p>Start with the decision, transition, pressure point, or pattern that most needs attention.</p></article>
<article class="coach-process-card"><span class="coach-icon-dot">02</span><h3>Make the work practical</h3><p>Turn reflection into something useful: a clearer choice, a stronger plan, or a better rhythm for action.</p></article>
<article class="coach-process-card"><span class="coach-icon-dot">03</span><h3>Move with consistency</h3><p>The aim is not more pressure. It is sustainable momentum that fits real life and real responsibility.</p></article>
</div>
<div class="coach-cta-band coach-section">
<h3>Not sure which option fits best?</h3>
<p>You can book directly if you already know what you need, or start with a message if you want to talk it through first.</p>
<p><a class="coach-inline-link" href="/book-session/">Book a session</a> <a class="coach-inline-link" href="/contact/" style="margin-left:.5rem;">Ask a question</a></p>
</div>
<!-- /wp:html -->
</div></div>
<!-- /wp:group -->
HTML;
}
function coaching_mvp_testimonials_content() {
return <<<'HTML'
<!-- wp:group {"className":"coach-shell","layout":{"type":"constrained"}} -->
<div class="wp-block-group coach-shell"><div class="wp-block-group__inner-container">
<!-- wp:paragraph {"className":"coach-badge"} --><p class="coach-badge">Client reflections</p><!-- /wp:paragraph -->
<!-- wp:heading {"level":1} --><h1 class="wp-block-heading">What clients often take away from this work</h1><!-- /wp:heading -->
<!-- wp:paragraph --><p>These reflections offer a sense of how the coaching feels in practice: grounded, direct, thoughtful, and genuinely useful when the stakes are real.</p><!-- /wp:paragraph -->
<!-- wp:shortcode -->
[coaching_testimonials limit="6"]
<!-- /wp:shortcode -->
<!-- wp:html -->
<div class="coach-mini-grid coach-section">
<div class="coach-mini-card"><h3>Clearer perspective</h3><p>Clients often leave with less mental noise and a better sense of what matters most.</p></div>
<div class="coach-mini-card"><h3>Calm accountability</h3><p>The work creates structure and movement without adding unnecessary pressure.</p></div>
<div class="coach-mini-card"><h3>Practical change</h3><p>Insight is important, but it becomes most valuable when it leads to steadier decisions and follow-through.</p></div>
</div>
<div class="coach-cta-band coach-section"><h3>Want to talk before you decide?</h3><p>If you are curious about fit, pace, or the right starting point, the contact page is a good first step.</p><p><a class="coach-inline-link" href="/contact/">Start the conversation</a></p></div>
<!-- /wp:html -->
</div></div>
<!-- /wp:group -->
HTML;
}
function coaching_mvp_about_content() {
return <<<'HTML'
<!-- wp:group {"className":"coach-shell","layout":{"type":"constrained"}} -->
<div class="wp-block-group coach-shell"><div class="wp-block-group__inner-container">
<!-- wp:paragraph {"className":"coach-badge"} --><p class="coach-badge">About the coach</p><!-- /wp:paragraph -->
<!-- wp:heading {"level":1} --><h1 class="wp-block-heading">Grounded coaching for people carrying meaningful responsibility</h1><!-- /wp:heading -->
<!-- wp:paragraph {"fontSize":"large"} --><p class="has-large-font-size">This work is for people who need a clear, thoughtful space to think well, decide honestly, and move forward with more steadiness.</p><!-- /wp:paragraph -->
<!-- wp:html -->
<div class="coach-grid-2 coach-section">
<div class="coach-panel">
<span class="coach-badge">Approach</span>
<h3>A calm space for honest thinking</h3>
<p>Coaching here is practical, reflective, and direct. The goal is not to overwhelm you with frameworks, but to help you see clearly, work through what matters, and take the next step with conviction.</p>
<p><a class="coach-inline-link" href="/services/">Explore services</a></p>
</div>
<div class="coach-story-grid">
<article class="coach-story-card"><h3>Philosophy</h3><p>Clarity before noise. Direction before urgency. Action that feels sustainable, not performative.</p></article>
<article class="coach-story-card"><h3>Experience</h3><p>This space can hold strategic questions, leadership pressure, identity shifts, and the quieter challenges that often sit underneath visible success.</p></article>
<article class="coach-story-card"><h3>Client experience</h3><p>Sessions are designed to feel steady, perceptive, and useful — a place for honest reflection that leads somewhere real.</p></article>
</div>
</div>
<div class="coach-process-grid coach-section">
<article class="coach-process-card"><span class="coach-icon-dot">01</span><h3>Listen deeply</h3><p>Start by understanding the real pressure, not just the polished version of the problem.</p></article>
<article class="coach-process-card"><span class="coach-icon-dot">02</span><h3>Create direction</h3><p>Bring structure to complexity so the next move becomes clearer and more trustworthy.</p></article>
<article class="coach-process-card"><span class="coach-icon-dot">03</span><h3>Support action</h3><p>Translate insight into decisions, behavior, rhythm, and follow-through that can actually hold.</p></article>
</div>
<div class="coach-cta-band coach-section"><h3>If the approach resonates, there is a clear next step</h3><p>You can explore the services, read client reflections, or reach out with a question before booking.</p><p><a class="coach-inline-link" href="/testimonials/">Read testimonials</a></p></div>
<!-- /wp:html -->
</div></div>
<!-- /wp:group -->
HTML;
}
function coaching_mvp_booking_content() {
return <<<'HTML'
<!-- wp:group {"className":"coach-shell","layout":{"type":"constrained"}} -->
<div class="wp-block-group coach-shell"><div class="wp-block-group__inner-container">
<!-- wp:paragraph {"className":"coach-badge"} --><p class="coach-badge">Book a session</p><!-- /wp:paragraph -->
<!-- wp:heading {"level":1} --><h1 class="wp-block-heading">Request a coaching session</h1><!-- /wp:heading -->
<!-- wp:paragraph --><p>This is a simple first step. Share what you need and a few timing details, and you will receive a personal follow-up to confirm fit and next steps.</p><!-- /wp:paragraph -->
<!-- wp:html -->
<div class="coach-booking-layout coach-section">
<div>[coaching_booking_form]</div>
<div class="coach-stack">
<div class="coach-mini-card"><h3>What happens next</h3><p>After you submit the form, you will receive a personal reply to confirm fit, timing, and the best place to begin.</p></div>
<div class="coach-mini-card"><h3>Best for</h3><p>This is a good option if you already know you want a session and are ready to choose a time.</p></div>
<div class="coach-mini-card"><h3>Session options</h3><p>You can request Zoom, phone, or in-person support depending on what is available and what fits best.</p></div>
<div class="coach-mini-card"><h3>Prefer a softer start?</h3><p>If you want to ask a question before booking, the contact page is there for that too.</p><p><a class="coach-inline-link" href="/contact/">Go to contact</a></p></div>
</div>
</div>
<!-- /wp:html -->
</div></div>
<!-- /wp:group -->
HTML;
}
function coaching_mvp_contact_content() {
return <<<'HTML'
<!-- wp:group {"className":"coach-shell","layout":{"type":"constrained"}} -->
<div class="wp-block-group coach-shell"><div class="wp-block-group__inner-container">
<!-- wp:paragraph {"className":"coach-badge"} --><p class="coach-badge">Get in touch</p><!-- /wp:paragraph -->
<!-- wp:heading {"level":1} --><h1 class="wp-block-heading">Start the conversation in a lower-pressure way</h1><!-- /wp:heading -->
<!-- wp:paragraph --><p>If you are not ready to book yet, you can start here. Questions, uncertainty, and a bit of context are all welcome.</p><!-- /wp:paragraph -->
<!-- wp:html -->
<div class="coach-booking-layout coach-section">
<div>[coaching_lead_form]</div>
<div class="coach-stack">
<div class="coach-mini-card"><h3>Good reasons to reach out</h3><p>You may want help choosing a service, checking fit, or naming what kind of support would be most useful right now.</p></div>
<div class="coach-mini-card"><h3>What to include</h3><p>A few lines about the challenge, transition, or decision you are carrying is enough to start.</p></div>
<div class="coach-mini-card"><h3>What happens next</h3><p>You will receive a thoughtful reply with the clearest next step, whether that is a booking, a recommendation, or a simple answer.</p></div>
<div class="coach-mini-card"><h3>Ready to book instead?</h3><p>If you already know you want a session, you can go straight to the booking page.</p><p><a class="coach-inline-link" href="/book-session/">Book a session</a></p></div>
</div>
</div>
<!-- /wp:html -->
</div></div>
<!-- /wp:group -->
HTML;
}
function coaching_mvp_template_pages() {
return [
'home' => [
'title' => 'Home',
'content' => coaching_mvp_home_content(),
],
'services' => [
'title' => 'Services',
'content' => coaching_mvp_services_content(),
],
'testimonials' => [
'title' => 'Testimonials',
'content' => coaching_mvp_testimonials_content(),
],
'about' => [
'title' => 'About',
'content' => coaching_mvp_about_content(),
],
'book-session' => [
'title' => 'Book Session',
'content' => coaching_mvp_booking_content(),
],
'contact' => [
'title' => 'Contact',
'content' => coaching_mvp_contact_content(),
],
'blog' => [
'title' => 'Blog',
'content' => '',
],
];
}
function coaching_mvp_upsert_page($slug, $definition, $overwrite_existing = false) {
$page = get_page_by_path($slug, OBJECT, 'page');
$postarr = [
'post_title' => $definition['title'],
'post_name' => $slug,
'post_type' => 'page',
'post_status' => 'publish',
'post_content' => $definition['content'],
];
if ($page) {
if ($overwrite_existing) {
$postarr['ID'] = $page->ID;
wp_update_post($postarr);
}
return (int) $page->ID;
}
return (int) wp_insert_post($postarr);
}
function coaching_mvp_seed_navigation($page_ids) {
$nav = get_page_by_title('Primary Navigation', OBJECT, 'wp_navigation');
$nav_content = sprintf(
"<!-- wp:navigation-link {\"label\":\"Home\",\"type\":\"page\",\"id\":%d,\"url\":\"/\",\"kind\":\"post-type\"} /-->\n" .
"<!-- wp:navigation-link {\"label\":\"Services\",\"type\":\"page\",\"id\":%d,\"url\":\"/services/\",\"kind\":\"post-type\"} /-->\n" .
"<!-- wp:navigation-link {\"label\":\"Testimonials\",\"type\":\"page\",\"id\":%d,\"url\":\"/testimonials/\",\"kind\":\"post-type\"} /-->\n" .
"<!-- wp:navigation-link {\"label\":\"About\",\"type\":\"page\",\"id\":%d,\"url\":\"/about/\",\"kind\":\"post-type\"} /-->\n" .
"<!-- wp:navigation-link {\"label\":\"Blog\",\"type\":\"page\",\"id\":%d,\"url\":\"/blog/\",\"kind\":\"post-type\"} /-->\n" .
"<!-- wp:navigation-link {\"label\":\"Book Session\",\"type\":\"page\",\"id\":%d,\"url\":\"/book-session/\",\"kind\":\"post-type\"} /-->\n" .
"<!-- wp:navigation-link {\"label\":\"Contact\",\"type\":\"page\",\"id\":%d,\"url\":\"/contact/\",\"kind\":\"post-type\"} /-->\n" .
"<!-- wp:navigation-link {\"label\":\"Admin\",\"type\":\"custom\",\"url\":\"/wp-admin/\",\"kind\":\"custom\"} /-->",
$page_ids['home'],
$page_ids['services'],
$page_ids['testimonials'],
$page_ids['about'],
$page_ids['blog'],
$page_ids['book-session'],
$page_ids['contact']
);
$postarr = [
'post_title' => 'Primary Navigation',
'post_status' => 'publish',
'post_type' => 'wp_navigation',
'post_content' => $nav_content,
];
if ($nav) {
$postarr['ID'] = $nav->ID;
wp_update_post($postarr);
return;
}
wp_insert_post($postarr);
}
function coaching_mvp_seed_testimonials() {
$items = [
[
'title' => 'Jordan Ellis — Sample',
'role' => 'Founder, advisory studio',
'content' => 'I came in overwhelmed and spread thin. The coaching process helped me narrow the signal, make cleaner decisions, and finally move with conviction instead of noise.',
'menu_order' => 1,
],
[
'title' => 'Maya Chen — Sample',
'role' => 'Senior leader, technology team',
'content' => 'What felt different was the balance of calm and challenge. I left each session with clearer priorities, stronger boundaries, and next steps I could actually execute.',
'menu_order' => 2,
],
[
'title' => 'Daniel Ross — Sample',
'role' => 'Executive coaching client',
'content' => 'This gave me the structure I was missing. Instead of collecting more insight, I built momentum and followed through on decisions I had delayed for months.',
'menu_order' => 3,
],
[
'title' => 'Alina Patel — Sample',
'role' => 'Creative founder, growth stage brand',
'content' => 'The sessions felt premium, focused, and deeply useful. I had space to think, but also enough accountability to convert clarity into action.',
'menu_order' => 4,
],
];
foreach ($items as $item) {
$existing = get_page_by_title($item['title'], OBJECT, 'testimonial');
$postarr = [
'post_type' => 'testimonial',
'post_status' => 'publish',
'post_title' => $item['title'],
'post_content' => $item['content'],
'menu_order' => $item['menu_order'],
];
if ($existing) {
$postarr['ID'] = $existing->ID;
$post_id = wp_update_post($postarr);
} else {
$post_id = wp_insert_post($postarr);
}
if ($post_id && !is_wp_error($post_id)) {
update_post_meta($post_id, '_testimonial_role', $item['role']);
}
}
}
function coaching_mvp_seed_blog_posts() {
$posts = [
[
'title' => 'How Clarity Creates Better Decisions',
'slug' => 'how-clarity-creates-better-decisions',
'content' => "Decision fatigue usually does not come from too few options. It comes from too many open loops. A good coaching conversation reduces noise, clarifies what matters now, and turns vague pressure into an honest next move.\n\nThoughtful content like this helps visitors feel the pace and tone of the work before they ever book. A simple blog can quietly build trust, authority, and familiarity without pulling attention away from the next step.",
],
[
'title' => 'When High Performers Need Structure, Not More Pressure',
'slug' => 'when-high-performers-need-structure-not-more-pressure',
'content' => "Many coaching clients do not need more motivation. They need better structure, cleaner priorities, and an environment that supports follow-through.\n\nWriting like this can support clients between sessions and help new visitors understand the kind of coaching relationship they are stepping into.",
],
[
'title' => 'A Better Rhythm for Coaching Between Insight and Action',
'slug' => 'a-better-rhythm-for-coaching-between-insight-and-action',
'content' => "Great coaching is not just about reflection. It is also about timing, pacing, and what happens after the session ends.\n\nArticles like this can hold practical reflection, grounded encouragement, and the kind of calm guidance clients can expect in the work itself.",
],
];
foreach ($posts as $item) {
$existing = get_page_by_path($item['slug'], OBJECT, 'post');
$postarr = [
'post_type' => 'post',
'post_status' => 'publish',
'post_title' => $item['title'],
'post_name' => $item['slug'],
'post_content' => $item['content'],
];
if ($existing) {
$postarr['ID'] = $existing->ID;
wp_update_post($postarr);
} else {
wp_insert_post($postarr);
}
}
}
function coaching_mvp_seed_template_content() {
if (get_option('coaching_mvp_template_version') === COACHING_MVP_TEMPLATE_VERSION) {
return;
}
$page_ids = [];
foreach (coaching_mvp_template_pages() as $slug => $definition) {
$page_ids[$slug] = coaching_mvp_upsert_page($slug, $definition);
}
if (!empty($page_ids['home'])) {
update_option('show_on_front', 'page');
update_option('page_on_front', $page_ids['home']);
}
if (!empty($page_ids['blog'])) {
update_option('page_for_posts', $page_ids['blog']);
}
coaching_mvp_seed_navigation($page_ids);
coaching_mvp_seed_testimonials();
coaching_mvp_seed_blog_posts();
update_option('coaching_mvp_template_version', COACHING_MVP_TEMPLATE_VERSION, false);
flush_rewrite_rules(false);
}
add_action('init', 'coaching_mvp_seed_template_content', 30);
function coaching_mvp_sanitize_textarea($value) {
return trim(wp_strip_all_tags((string) $value));
}
function coaching_mvp_handle_forms() {
if ($_SERVER['REQUEST_METHOD'] !== 'POST' || empty($_POST['coaching_form_action'])) {
return;
}
$action = sanitize_key(wp_unslash($_POST['coaching_form_action']));
$redirect = !empty($_POST['_wp_http_referer']) ? wp_unslash($_POST['_wp_http_referer']) : home_url('/');
$redirect = remove_query_arg(['booking_status', 'lead_status'], $redirect);
if (!isset($_POST['coaching_form_nonce']) || !wp_verify_nonce(wp_unslash($_POST['coaching_form_nonce']), 'coaching_form_submit')) {
wp_safe_redirect(add_query_arg($action === 'booking' ? 'booking_status' : 'lead_status', 'error', $redirect));
exit;
}
$name = sanitize_text_field(wp_unslash($_POST['name'] ?? ''));
$email = sanitize_email(wp_unslash($_POST['email'] ?? ''));
$phone = sanitize_text_field(wp_unslash($_POST['phone'] ?? ''));
$message = coaching_mvp_sanitize_textarea(wp_unslash($_POST['message'] ?? ''));
if (!$name || !$email) {
wp_safe_redirect(add_query_arg($action === 'booking' ? 'booking_status' : 'lead_status', 'error', $redirect));
exit;
}
if ($action === 'booking') {
$service = sanitize_text_field(wp_unslash($_POST['service'] ?? 'Discovery Call'));
$preferred_date = sanitize_text_field(wp_unslash($_POST['preferred_date'] ?? ''));
$preferred_time = sanitize_text_field(wp_unslash($_POST['preferred_time'] ?? ''));
$format = sanitize_text_field(wp_unslash($_POST['session_format'] ?? 'Zoom'));
$goal = coaching_mvp_sanitize_textarea(wp_unslash($_POST['goal'] ?? ''));
$post_id = wp_insert_post([
'post_type' => 'booking_request',
'post_status' => 'private',
'post_title' => sprintf('%s — %s', $name, $preferred_date ?: current_time('Y-m-d')),
], true);
if (is_wp_error($post_id)) {
wp_safe_redirect(add_query_arg('booking_status', 'error', $redirect));
exit;
}
update_post_meta($post_id, '_booking_name', $name);
update_post_meta($post_id, '_booking_email', $email);
update_post_meta($post_id, '_booking_phone', $phone);
update_post_meta($post_id, '_booking_service', $service);
update_post_meta($post_id, '_booking_date', $preferred_date);
update_post_meta($post_id, '_booking_time', $preferred_time);
update_post_meta($post_id, '_booking_format', $format);
update_post_meta($post_id, '_booking_goal', $goal);
update_post_meta($post_id, '_booking_message', $message);
wp_safe_redirect(add_query_arg('booking_status', 'success', $redirect));
exit;
}
if ($action === 'lead') {
$focus = sanitize_text_field(wp_unslash($_POST['focus'] ?? ''));
$company = sanitize_text_field(wp_unslash($_POST['company'] ?? ''));
$post_id = wp_insert_post([
'post_type' => 'lead_capture',
'post_status' => 'private',
'post_title' => sprintf('%s — %s', $name, current_time('Y-m-d H:i')),
], true);
if (is_wp_error($post_id)) {
wp_safe_redirect(add_query_arg('lead_status', 'error', $redirect));
exit;
}
update_post_meta($post_id, '_lead_name', $name);
update_post_meta($post_id, '_lead_email', $email);
update_post_meta($post_id, '_lead_phone', $phone);
update_post_meta($post_id, '_lead_company', $company);
update_post_meta($post_id, '_lead_focus', $focus);
update_post_meta($post_id, '_lead_message', $message);
wp_safe_redirect(add_query_arg('lead_status', 'success', $redirect));
exit;
}
}
add_action('template_redirect', 'coaching_mvp_handle_forms', 1);
function coaching_mvp_booking_form_shortcode() {
$status = isset($_GET['booking_status']) ? sanitize_key(wp_unslash($_GET['booking_status'])) : '';
ob_start();
?>
<div class="coach-form-wrap" id="book-form">
<?php if ($status === 'success') : ?>
<div class="coach-alert success">Thanks — your request was received. You will hear back soon to confirm fit, timing, and details.</div>
<?php elseif ($status === 'error') : ?>
<div class="coach-alert error">Please complete the required fields and try again.</div>
<?php endif; ?>
<div class="coach-stack">
<div>
<span class="coach-badge">Book a session</span>
<h3>Request your coaching session</h3>
<p>Choose the service, preferred date, and format. This request creates a simple starting point for a personal follow-up.</p>
</div>
<form method="post" class="coach-stack">
<?php wp_nonce_field('coaching_form_submit', 'coaching_form_nonce'); ?>
<input type="hidden" name="coaching_form_action" value="booking" />
<div class="coach-form-grid">
<div>
<label for="coach-book-name">Full name</label>
<input id="coach-book-name" type="text" name="name" required />
</div>
<div>
<label for="coach-book-email">Email</label>
<input id="coach-book-email" type="email" name="email" required />
</div>
<div>
<label for="coach-book-phone">Phone</label>
<input id="coach-book-phone" type="text" name="phone" />
</div>
<div>
<label for="coach-book-service">Service</label>
<select id="coach-book-service" name="service">
<?php foreach (coaching_mvp_services() as $value => $label) : ?>
<option value="<?php echo esc_attr($label); ?>"><?php echo esc_html($label); ?></option>
<?php endforeach; ?>
</select>
</div>
<div>
<label for="coach-book-date">Preferred date</label>
<input id="coach-book-date" type="date" name="preferred_date" required />
</div>
<div>
<label for="coach-book-time">Preferred time</label>
<input id="coach-book-time" type="time" name="preferred_time" required />
</div>
<div>
<label for="coach-book-format">Session format</label>
<select id="coach-book-format" name="session_format">
<option value="Zoom">Zoom</option>
<option value="Phone">Phone</option>
<option value="In Person">In Person</option>
</select>
</div>
<div class="full">
<label for="coach-book-goal">What would you like help with?</label>
<textarea id="coach-book-goal" name="goal" placeholder="Share the challenge, decision, transition, or result you want support with."></textarea>
</div>
<div class="full">
<label for="coach-book-message">Anything else?</label>
<textarea id="coach-book-message" name="message" placeholder="Include context, timing constraints, or preferred cadence."></textarea>
</div>
</div>
<div>
<button type="submit">Request Session</button>
</div>
</form>
</div>
</div>
<?php
return ob_get_clean();
}
add_shortcode('coaching_booking_form', 'coaching_mvp_booking_form_shortcode');
function coaching_mvp_lead_form_shortcode() {
$status = isset($_GET['lead_status']) ? sanitize_key(wp_unslash($_GET['lead_status'])) : '';
ob_start();
?>
<div class="coach-form-wrap" id="lead-form">
<?php if ($status === 'success') : ?>
<div class="coach-alert success">Thanks — your message was received. You will get a thoughtful reply soon.</div>
<?php elseif ($status === 'error') : ?>
<div class="coach-alert error">Please add your name and email so we can respond properly.</div>
<?php endif; ?>
<div class="coach-stack">
<div>
<span class="coach-badge">Get in touch</span>
<h3>Start with a note</h3>
<p>Share a little context and you can receive a thoughtful reply about the best next step.</p>
</div>
<form method="post" class="coach-stack">
<?php wp_nonce_field('coaching_form_submit', 'coaching_form_nonce'); ?>
<input type="hidden" name="coaching_form_action" value="lead" />
<div class="coach-form-grid">
<div>
<label for="coach-lead-name">Full name</label>
<input id="coach-lead-name" type="text" name="name" required />
</div>
<div>
<label for="coach-lead-email">Email</label>
<input id="coach-lead-email" type="email" name="email" required />
</div>
<div>
<label for="coach-lead-phone">Phone</label>
<input id="coach-lead-phone" type="text" name="phone" />
</div>
<div>
<label for="coach-lead-company">Company / role</label>
<input id="coach-lead-company" type="text" name="company" />
</div>
<div class="full">
<label for="coach-lead-focus">What are you working toward?</label>
<input id="coach-lead-focus" type="text" name="focus" placeholder="Examples: leadership transition, consistency, executive presence, burnout recovery" />
</div>
<div class="full">
<label for="coach-lead-message">Message</label>
<textarea id="coach-lead-message" name="message" placeholder="Share what support would feel most valuable right now."></textarea>
</div>
</div>
<div>
<button type="submit">Send Inquiry</button>
</div>
</form>
</div>
</div>
<?php
return ob_get_clean();
}
add_shortcode('coaching_lead_form', 'coaching_mvp_lead_form_shortcode');
function coaching_mvp_services_shortcode($atts = []) {
$atts = shortcode_atts(['limit' => 4], $atts, 'coaching_services');
$limit = max(1, (int) $atts['limit']);
$catalog = array_slice(coaching_mvp_service_catalog(), 0, $limit, true);
ob_start();
echo '<div class="coach-card-grid">';
foreach ($catalog as $service) {
echo '<article class="coach-service-card">';
echo '<span class="coach-icon-dot">' . esc_html($service['code']) . '</span>';
echo '<h3>' . esc_html($service['label']) . '</h3>';
echo '<p>' . esc_html($service['summary']) . '</p>';
echo '<ul>';
foreach ($service['bullets'] as $bullet) {
echo '<li>' . esc_html($bullet) . '</li>';
}
echo '</ul>';
echo '</article>';
}
echo '</div>';
return ob_get_clean();
}
add_shortcode('coaching_services', 'coaching_mvp_services_shortcode');
function coaching_mvp_testimonials_shortcode($atts = []) {
$atts = shortcode_atts(['limit' => 6], $atts, 'coaching_testimonials');
$items = get_posts([
'post_type' => 'testimonial',
'post_status' => 'publish',
'numberposts' => (int) $atts['limit'],
'orderby' => 'menu_order date',
'order' => 'ASC',
]);
if (!$items) {
return '<p>No testimonials yet.</p>';
}
ob_start();
echo '<div class="coach-testimonial-grid">';
foreach ($items as $item) {
$role = get_post_meta($item->ID, '_testimonial_role', true);
echo '<article class="coach-testimonial-card">';
echo '<div class="coach-rating">★★★★★</div>';
echo '<blockquote><p>' . esc_html(wp_strip_all_tags($item->post_content)) . '</p></blockquote>';
echo '<h3>' . esc_html(get_the_title($item)) . '</h3>';
if ($role) {
echo '<div class="coach-testimonial-meta">' . esc_html($role) . '</div>';
}
echo '</article>';
}
echo '</div>';
return ob_get_clean();
}
add_shortcode('coaching_testimonials', 'coaching_mvp_testimonials_shortcode');
function coaching_mvp_recent_posts_shortcode($atts = []) {
$atts = shortcode_atts(['limit' => 3], $atts, 'coaching_recent_posts');
$items = get_posts([
'post_type' => 'post',
'post_status' => 'publish',
'numberposts' => (int) $atts['limit'],
'orderby' => 'date',
'order' => 'DESC',
]);
if (!$items) {
return '<p>No blog posts yet.</p>';
}
ob_start();
echo '<div class="coach-blog-grid">';
foreach ($items as $item) {
echo '<article class="coach-blog-card">';
echo '<span class="coach-badge">Blog</span>';
echo '<h3><a href="' . esc_url(get_permalink($item)) . '">' . esc_html(get_the_title($item)) . '</a></h3>';
echo '<p>' . esc_html(wp_trim_words(wp_strip_all_tags($item->post_content), 26)) . '</p>';
echo '<a class="coach-admin-link" href="' . esc_url(get_permalink($item)) . '">Read article →</a>';
echo '</article>';
}
echo '</div>';
return ob_get_clean();
}
add_shortcode('coaching_recent_posts', 'coaching_mvp_recent_posts_shortcode');
function coaching_mvp_admin_columns($columns, $post_type) {
if ($post_type === 'booking_request') {
return [
'cb' => $columns['cb'],
'title' => 'Booking',
'service' => 'Service',
'date' => 'Date',
'contact' => 'Contact',
'format' => 'Format',
];
}
if ($post_type === 'lead_capture') {
return [
'cb' => $columns['cb'],
'title' => 'Lead',
'focus' => 'Focus',
'contact' => 'Contact',
'date' => 'Received',
];
}
if ($post_type === 'testimonial') {
$columns['role'] = 'Role';
return $columns;
}
return $columns;
}
add_filter('manage_booking_request_posts_columns', fn($columns) => coaching_mvp_admin_columns($columns, 'booking_request'));
add_filter('manage_lead_capture_posts_columns', fn($columns) => coaching_mvp_admin_columns($columns, 'lead_capture'));
add_filter('manage_testimonial_posts_columns', fn($columns) => coaching_mvp_admin_columns($columns, 'testimonial'));
function coaching_mvp_render_admin_column($column, $post_id) {
switch ($column) {
case 'service':
echo esc_html((string) get_post_meta($post_id, '_booking_service', true));
break;
case 'date':
if (get_post_type($post_id) === 'booking_request') {
$date = get_post_meta($post_id, '_booking_date', true);
$time = get_post_meta($post_id, '_booking_time', true);
echo esc_html(trim($date . ' ' . $time));
} else {
echo esc_html(get_the_date('Y-m-d H:i', $post_id));
}
break;
case 'contact':
$email_key = get_post_type($post_id) === 'booking_request' ? '_booking_email' : '_lead_email';
$phone_key = get_post_type($post_id) === 'booking_request' ? '_booking_phone' : '_lead_phone';
echo esc_html((string) get_post_meta($post_id, $email_key, true));
$phone = get_post_meta($post_id, $phone_key, true);
if ($phone) {
echo '<br>' . esc_html((string) $phone);
}
break;
case 'format':
echo esc_html((string) get_post_meta($post_id, '_booking_format', true));
break;
case 'focus':
echo esc_html((string) get_post_meta($post_id, '_lead_focus', true));
break;
case 'role':
echo esc_html((string) get_post_meta($post_id, '_testimonial_role', true));
break;
}
}
add_action('manage_booking_request_posts_custom_column', 'coaching_mvp_render_admin_column', 10, 2);
add_action('manage_lead_capture_posts_custom_column', 'coaching_mvp_render_admin_column', 10, 2);
add_action('manage_testimonial_posts_custom_column', 'coaching_mvp_render_admin_column', 10, 2);
function coaching_mvp_details_meta_box() {
foreach (['booking_request', 'lead_capture'] as $post_type) {
add_meta_box('coaching-mvp-details', 'Submission Details', 'coaching_mvp_details_meta_box_html', $post_type, 'normal', 'high');
}
add_meta_box('coaching-mvp-testimonial-role', 'Testimonial Details', 'coaching_mvp_testimonial_meta_box_html', 'testimonial', 'side');
}
add_action('add_meta_boxes', 'coaching_mvp_details_meta_box');
function coaching_mvp_details_meta_box_html($post) {
if ($post->post_type === 'booking_request') {
$fields = [
'Name' => get_post_meta($post->ID, '_booking_name', true),
'Email' => get_post_meta($post->ID, '_booking_email', true),
'Phone' => get_post_meta($post->ID, '_booking_phone', true),
'Service' => get_post_meta($post->ID, '_booking_service', true),
'Preferred date' => get_post_meta($post->ID, '_booking_date', true),
'Preferred time' => get_post_meta($post->ID, '_booking_time', true),
'Format' => get_post_meta($post->ID, '_booking_format', true),
'Goal' => get_post_meta($post->ID, '_booking_goal', true),
'Extra notes' => get_post_meta($post->ID, '_booking_message', true),
];
} else {
$fields = [
'Name' => get_post_meta($post->ID, '_lead_name', true),
'Email' => get_post_meta($post->ID, '_lead_email', true),
'Phone' => get_post_meta($post->ID, '_lead_phone', true),
'Company / role' => get_post_meta($post->ID, '_lead_company', true),
'Focus area' => get_post_meta($post->ID, '_lead_focus', true),
'Message' => get_post_meta($post->ID, '_lead_message', true),
];
}
echo '<div class="coaching-admin-meta">';
foreach ($fields as $label => $value) {
echo '<p><strong>' . esc_html($label) . ':</strong><br>' . nl2br(esc_html((string) $value)) . '</p>';
}
echo '</div>';
}
function coaching_mvp_testimonial_meta_box_html($post) {
wp_nonce_field('coaching_testimonial_meta', 'coaching_testimonial_meta_nonce');
$role = get_post_meta($post->ID, '_testimonial_role', true);
echo '<p><label for="coaching-testimonial-role"><strong>Role / context</strong></label></p>';
echo '<input type="text" id="coaching-testimonial-role" name="coaching_testimonial_role" value="' . esc_attr((string) $role) . '" style="width:100%;" />';
echo '<p class="description">Example: Founder, Sample Client</p>';
}
function coaching_mvp_save_testimonial_meta($post_id) {
if (!isset($_POST['coaching_testimonial_meta_nonce']) || !wp_verify_nonce(wp_unslash($_POST['coaching_testimonial_meta_nonce']), 'coaching_testimonial_meta')) {
return;
}
if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {
return;
}
if (isset($_POST['coaching_testimonial_role'])) {
update_post_meta($post_id, '_testimonial_role', sanitize_text_field(wp_unslash($_POST['coaching_testimonial_role'])));
}
}
add_action('save_post_testimonial', 'coaching_mvp_save_testimonial_meta');
function coaching_mvp_current_request_origin() {
if (defined('WP_CLI') && WP_CLI) {
return null;
}
$host = '';
if (!empty($_SERVER['HTTP_X_FORWARDED_HOST'])) {
$parts = explode(',', (string) $_SERVER['HTTP_X_FORWARDED_HOST']);
$host = trim(end($parts));
} elseif (!empty($_SERVER['HTTP_HOST'])) {
$host = trim((string) $_SERVER['HTTP_HOST']);
}
if ($host === '' || preg_match('/[^a-z0-9\-\.:\[\]]/i', $host)) {
return null;
}
$scheme = 'http';
if (!empty($_SERVER['HTTP_X_FORWARDED_PROTO'])) {
$parts = explode(',', (string) $_SERVER['HTTP_X_FORWARDED_PROTO']);
$candidate = strtolower(trim(end($parts)));
if (in_array($candidate, ['http', 'https'], true)) {
$scheme = $candidate;
}
} elseif (!empty($_SERVER['REQUEST_SCHEME']) && in_array($_SERVER['REQUEST_SCHEME'], ['http', 'https'], true)) {
$scheme = $_SERVER['REQUEST_SCHEME'];
} elseif (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') {
$scheme = 'https';
}
return $scheme . '://' . $host;
}
function coaching_mvp_should_replace_local_host($url) {
$host = wp_parse_url($url, PHP_URL_HOST);
return in_array($host, ['localhost', '127.0.0.1', '::1'], true);
}
function coaching_mvp_replace_local_origin($url) {
$origin = coaching_mvp_current_request_origin();
if (!$origin || !coaching_mvp_should_replace_local_host($url)) {
return $url;
}
$path = (string) wp_parse_url($url, PHP_URL_PATH);
$query = wp_parse_url($url, PHP_URL_QUERY);
$fragment = wp_parse_url($url, PHP_URL_FRAGMENT);
$rebuilt = rtrim($origin, '/') . $path;
if ($query) {
$rebuilt .= '?' . $query;
}
if ($fragment) {
$rebuilt .= '#' . $fragment;
}
return $rebuilt;
}
function coaching_mvp_filter_option_home($value) {
return coaching_mvp_replace_local_origin((string) $value);
}
add_filter('option_home', 'coaching_mvp_filter_option_home');
add_filter('option_siteurl', 'coaching_mvp_filter_option_home');
function coaching_mvp_filter_generated_url($url) {
return coaching_mvp_replace_local_origin((string) $url);
}
add_filter('home_url', 'coaching_mvp_filter_generated_url', 10, 1);
add_filter('site_url', 'coaching_mvp_filter_generated_url', 10, 1);
add_filter('content_url', 'coaching_mvp_filter_generated_url', 10, 1);
add_filter('plugins_url', 'coaching_mvp_filter_generated_url', 10, 1);
add_filter('includes_url', 'coaching_mvp_filter_generated_url', 10, 1);
add_filter('rest_url', 'coaching_mvp_filter_generated_url', 10, 1);
add_filter('network_home_url', 'coaching_mvp_filter_generated_url', 10, 1);
add_filter('network_site_url', 'coaching_mvp_filter_generated_url', 10, 1);
function coaching_mvp_replace_local_origin_in_html($html) {
$origin = coaching_mvp_current_request_origin();
if (!$origin || !is_string($html) || $html === '') {
return $html;
}
return str_replace(
['http://localhost', 'https://localhost', 'http://127.0.0.1', 'https://127.0.0.1'],
$origin,
$html
);
}
function coaching_mvp_filter_rendered_block_html($block_content) {
if (is_admin()) {
return $block_content;
}
return coaching_mvp_replace_local_origin_in_html($block_content);
}
add_filter('render_block', 'coaching_mvp_filter_rendered_block_html', 10, 1);