This commit is contained in:
Flatlogic Bot 2026-03-24 13:53:19 +00:00
parent 7e7ce16c3a
commit ee66d70763
2 changed files with 390 additions and 36 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

View File

@ -8,7 +8,7 @@ if (!defined('ABSPATH')) {
exit; exit;
} }
const COACHING_MVP_TEMPLATE_VERSION = '2.0.3'; const COACHING_MVP_TEMPLATE_VERSION = '2.0.4';
function coaching_mvp_service_catalog() { function coaching_mvp_service_catalog() {
return [ return [
@ -94,6 +94,22 @@ function coaching_mvp_register_post_types() {
'capability_type' => 'post', 'capability_type' => 'post',
'map_meta_cap' => true, 'map_meta_cap' => true,
]); ]);
register_post_type('faq_item', [
'labels' => [
'name' => 'FAQs',
'singular_name' => 'FAQ',
'add_new_item' => 'Add FAQ',
'edit_item' => 'Edit FAQ',
],
'public' => false,
'show_ui' => true,
'show_in_rest' => true,
'menu_icon' => 'dashicons-editor-help',
'supports' => ['title', 'editor', 'page-attributes'],
'capability_type' => 'post',
'map_meta_cap' => true,
]);
} }
add_action('init', 'coaching_mvp_register_post_types'); add_action('init', 'coaching_mvp_register_post_types');
@ -298,6 +314,26 @@ body.coaching-mvp-active.page .wp-block-post-title {
body.coaching-mvp-active.page main > .wp-block-group.alignfull.has-global-padding { body.coaching-mvp-active.page main > .wp-block-group.alignfull.has-global-padding {
padding-top: 0 !important; padding-top: 0 !important;
} }
body.coaching-mvp-active.blog main.wp-block-group.has-global-padding,
body.coaching-mvp-active.archive main.wp-block-group.has-global-padding {
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.blog main > .wp-block-query.alignfull,
body.coaching-mvp-active.blog .wp-block-query .wp-block-post-template.alignfull,
body.coaching-mvp-active.blog .wp-block-query .wp-block-post > .wp-block-group.alignfull,
body.coaching-mvp-active.blog .wp-block-query .entry-content.alignfull.wp-block-post-content,
body.coaching-mvp-active.archive main > .wp-block-query.alignfull,
body.coaching-mvp-active.archive .wp-block-query .wp-block-post-template.alignfull,
body.coaching-mvp-active.archive .wp-block-query .wp-block-post > .wp-block-group.alignfull,
body.coaching-mvp-active.archive .wp-block-query .entry-content.alignfull.wp-block-post-content {
width: 100% !important;
max-width: 100% !important;
margin-left: 0 !important;
margin-right: 0 !important;
}
.coach-shell, .coach-shell,
.coach-hero, .coach-hero,
.coach-section, .coach-section,
@ -692,6 +728,167 @@ body.coaching-mvp-active.page main > .wp-block-group.alignfull.has-global-paddin
.coach-system-card ul { .coach-system-card ul {
margin: .8rem 0 0 1rem; margin: .8rem 0 0 1rem;
} }
.coach-proof-stack {
display: grid;
gap: .95rem;
}
.coach-proof-list,
.coach-audience-card ul {
margin: .2rem 0 0 1rem;
}
.coach-faq-stack {
display: grid;
grid-template-columns: 1fr;
gap: 1rem;
}
.coach-logo-grid {
display: flex;
flex-wrap: wrap;
gap: .7rem;
}
.coach-logo-chip {
display: inline-flex;
align-items: center;
justify-content: center;
padding: .62rem .9rem;
border-radius: 999px;
border: 1px solid rgba(95,45,255,.12);
background: rgba(95,45,255,.05);
color: var(--coach-deep);
font-size: .86rem;
font-weight: 700;
}
.coach-audience-card {
display: flex;
flex-direction: column;
min-height: 100%;
}
.coach-audience-card p:last-child,
.coach-audience-card ul:last-child {
margin-bottom: 0;
}
.coach-faq-item {
width: 100%;
overflow: hidden;
border-radius: 24px;
padding: 1.2rem 1.35rem;
}
.coach-faq-stack .coach-faq-card,
.coach-faq-stack .coach-faq-card:hover {
transform: none;
}
.coach-faq-stack .coach-faq-card:hover {
box-shadow: var(--coach-shadow-card);
border-color: rgba(95,45,255,.12);
}
.coach-faq-item summary {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 1rem;
cursor: pointer;
list-style: none;
font-weight: 700;
color: var(--coach-deep);
}
.coach-faq-item summary::-webkit-details-marker {
display: none;
}
.coach-faq-item summary::after {
content: '+';
flex: 0 0 auto;
width: 2rem;
height: 2rem;
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: 999px;
background: rgba(95,45,255,.08);
color: var(--coach-primary);
font-size: 1.15rem;
line-height: 1;
}
.coach-faq-item[open] summary::after {
content: '';
}
.coach-faq-answer {
margin-top: .95rem;
padding-top: .95rem;
border-top: 1px solid rgba(95,45,255,.08);
}
.coach-faq-answer > *:last-child {
margin-bottom: 0;
}
.coach-final-actions {
display: flex;
flex-wrap: wrap;
gap: .85rem;
margin-top: 1.1rem;
}
.coach-final-cta {
background: linear-gradient(135deg, rgba(8,17,38,.96), rgba(36,25,107,.92));
border: 1px solid rgba(255,255,255,.08);
box-shadow: 0 26px 60px rgba(6,13,31,.18);
}
.coach-final-cta h2,
.coach-final-cta h3,
.coach-final-cta p,
.coach-final-cta li,
.coach-final-cta .coach-badge {
color: #fff;
}
.coach-final-cta .coach-badge {
background: rgba(255,255,255,.12);
border-color: rgba(255,255,255,.12);
}
.coach-final-cta .coach-mini-card {
background: rgba(255,255,255,.08);
border-color: rgba(255,255,255,.10);
box-shadow: none;
}
.coach-final-cta .coach-mini-card p {
color: rgba(255,255,255,.78);
}
.coach-final-cta .coach-inline-link {
color: #fff;
background: rgba(255,255,255,.08);
border-color: rgba(255,255,255,.18);
box-shadow: none;
}
.coach-final-cta .coach-inline-link:hover,
.coach-final-cta .coach-inline-link:focus-visible {
background: rgba(255,255,255,.14);
border-color: rgba(255,255,255,.26);
box-shadow: 0 14px 28px rgba(6,13,31,.18);
filter: none;
}
.coach-final-cta .coach-inline-link.is-primary {
color: var(--coach-deep);
background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(241,245,255,.95));
border-color: rgba(255,255,255,.72);
box-shadow: 0 16px 34px rgba(6,13,31,.18);
}
.coach-final-cta .coach-inline-link.is-primary:hover,
.coach-final-cta .coach-inline-link.is-primary:focus-visible {
background: linear-gradient(180deg, #ffffff, rgba(248,250,255,.98));
border-color: rgba(255,255,255,.85);
box-shadow: 0 20px 38px rgba(6,13,31,.22);
}
.coach-final-cta .coach-inline-link.is-secondary {
color: #fff;
background: rgba(255,255,255,.06);
border-color: rgba(255,255,255,.22);
}
@media (max-width: 781px) {
.coach-final-actions {
flex-direction: column;
align-items: stretch;
}
.coach-final-actions .coach-inline-link {
justify-content: center;
text-align: center;
}
}
.coach-icon-dot { .coach-icon-dot {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
@ -1203,12 +1400,24 @@ body.coaching-mvp-active.page main > .wp-block-group.alignfull.has-global-paddin
} }
.coach-form-grid { .coach-form-grid {
display: grid; display: grid;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 1rem; gap: 1rem;
align-items: start;
}
.coach-form-grid > div {
min-width: 0;
} }
.coach-form-grid .full { .coach-form-grid .full {
grid-column: 1 / -1; grid-column: 1 / -1;
} }
@media (max-width: 720px) {
.coach-form-grid {
grid-template-columns: minmax(0, 1fr);
}
.coach-form-grid .full {
grid-column: auto;
}
}
.coach-form-wrap label { .coach-form-wrap label {
display: block; display: block;
font-weight: 700; font-weight: 700;
@ -1218,7 +1427,11 @@ body.coaching-mvp-active.page main > .wp-block-group.alignfull.has-global-paddin
.coach-form-wrap input, .coach-form-wrap input,
.coach-form-wrap textarea, .coach-form-wrap textarea,
.coach-form-wrap select { .coach-form-wrap select {
display: block;
width: 100%; width: 100%;
max-width: 100%;
min-width: 0;
box-sizing: border-box;
border: 1px solid rgba(20,32,51,.12); border: 1px solid rgba(20,32,51,.12);
border-radius: 16px; border-radius: 16px;
padding: .9rem 1rem; padding: .9rem 1rem;
@ -1461,10 +1674,10 @@ function coaching_mvp_home_content() {
<!-- /wp:paragraph --> <!-- /wp:paragraph -->
<!-- wp:buttons --> <!-- wp:buttons -->
<div class="wp-block-buttons"><!-- wp:button {"backgroundColor":"contrast-3","textColor":"base"} --> <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> <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 a call</a></div>
<!-- /wp:button --> <!-- /wp:button -->
<!-- wp:button {"className":"is-style-outline"} --> <!-- 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> <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:button --></div>
<!-- /wp:buttons --> <!-- /wp:buttons -->
<!-- wp:list --> <!-- wp:list -->
@ -1495,35 +1708,65 @@ function coaching_mvp_home_content() {
</div> </div>
<!-- /wp:group --> <!-- /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"}} --> <!-- 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"> <div class="wp-block-group coach-section"><div class="wp-block-group__inner-container">
<!-- wp:paragraph {"className":"coach-badge"} --> <!-- wp:paragraph {"className":"coach-badge"} -->
<p class="coach-badge">How we can work together</p> <p class="coach-badge">Trust &amp; credibility</p>
<!-- /wp:paragraph --> <!-- /wp:paragraph -->
<!-- wp:heading --> <!-- wp:heading -->
<h2 class="wp-block-heading">Coaching support for leadership, transitions, and high-pressure moments</h2> <h2 class="wp-block-heading">Built around real coaching signals: clear credentials, clear context, clear fit</h2>
<!-- /wp:heading -->
<!-- wp:html -->
<div class="coach-grid-2">
<div class="coach-panel coach-proof-stack">
<div>
<span class="coach-badge">Credentials</span>
<h3>Leadership, transition, and decision-support coaching</h3>
<p>The positioning is built for premium 1:1 coaching: confidential conversations, practical momentum, and calm strategic support.</p>
</div>
<ul class="coach-proof-list">
<li>1:1 coaching containers</li>
<li>Executive and founder-friendly tone</li>
<li>Virtual-first delivery for busy schedules</li>
</ul>
</div>
<div class="coach-panel coach-proof-stack">
<div>
<span class="coach-badge">Worked with / fit</span>
<h3>Easy to customize for the audiences most coaching sites actually target</h3>
<p>Instead of fake brand logos, this strip uses editable proof chips that future clients can quickly tailor to their real background and niche.</p>
</div>
<div class="coach-logo-grid">
<span class="coach-logo-chip">Founders</span>
<span class="coach-logo-chip">Executives</span>
<span class="coach-logo-chip">Consulting leaders</span>
<span class="coach-logo-chip">Product teams</span>
<span class="coach-logo-chip">Creative operators</span>
<span class="coach-logo-chip">Professionals in transition</span>
</div>
</div>
</div>
<!-- /wp:html -->
</div></div>
<!-- /wp:group -->
<!-- wp:group {"className":"coach-section coach-work-together-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">Who I help</p>
<!-- /wp:paragraph -->
<!-- wp:heading -->
<h2 class="wp-block-heading">Four audience profiles this template is already designed to convert</h2>
<!-- /wp:heading --> <!-- /wp:heading -->
<!-- wp:paragraph --> <!-- 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> <p>Instead of one generic coaching promise, the homepage now makes the fit clearer for the most common premium coaching audiences.</p>
<!-- /wp:paragraph --> <!-- /wp:paragraph -->
<!-- wp:html --> <!-- wp:html -->
<div class="coach-system-grid coach-work-grid"> <div class="coach-card-grid coach-audience-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 coach-audience-card" data-icon=""><span class="coach-icon-dot">01</span><h3>Founders</h3><p>For startup and business founders carrying decision-fatigue, team pressure, and the need to lead with more calm.</p><ul><li>Strategic clarity</li><li>Founder pressure support</li><li>Cleaner decisions</li></ul></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 coach-audience-card" data-icon=""><span class="coach-icon-dot">02</span><h3>Executives</h3><p>For senior leaders navigating visibility, communication, performance, and the emotional load of responsibility.</p><ul><li>Leadership presence</li><li>Difficult conversations</li><li>High-stakes seasons</li></ul></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 coach-audience-card" data-icon=""><span class="coach-icon-dot">03</span><h3>Professionals in transition</h3><p>For people moving through promotion, role change, career pivot, or a major professional reset.</p><ul><li>Career transition support</li><li>Confidence in change</li><li>Direction and momentum</li></ul></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 coach-audience-card" data-icon=""><span class="coach-icon-dot">04</span><h3>High-performing professionals</h3><p>For ambitious clients who do not need more pressure they need structure, perspective, and sustainable progress.</p><ul><li>Burnout prevention</li><li>Focus and follow-through</li><li>Healthier working rhythm</li></ul></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> </div>
<!-- /wp:html --> <!-- /wp:html -->
</div></div> </div></div>
@ -1577,8 +1820,8 @@ function coaching_mvp_home_content() {
<div> <div>
<span class="coach-badge">Ready to begin?</span> <span class="coach-badge">Ready to begin?</span>
<h2>Take the next step in a way that feels clear and manageable</h2> <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>If you already know you want support, book a call. 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> <p><a class="coach-inline-link" href="/book-session/">Book a call</a> <a class="coach-inline-link" href="/services/" style="margin-left:.5rem">View services</a></p>
</div> </div>
<div class="coach-process-grid"> <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">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>
@ -1632,7 +1875,21 @@ function coaching_mvp_home_content() {
<!-- wp:group {"className":"coach-section","layout":{"type":"constrained"}} --> <!-- wp:group {"className":"coach-section","layout":{"type":"constrained"}} -->
<div class="wp-block-group coach-section"><div class="wp-block-group__inner-container"> <div class="wp-block-group coach-section"><div class="wp-block-group__inner-container">
<!-- wp:paragraph {"className":"coach-badge"} --> <!-- wp:paragraph {"className":"coach-badge"} -->
<p class="coach-badge">Insights & articles</p> <p class="coach-badge">FAQ</p>
<!-- /wp:paragraph -->
<!-- wp:heading -->
<h2 class="wp-block-heading">Questions people usually ask before they book a call</h2>
<!-- /wp:heading -->
<!-- wp:shortcode -->
[coaching_faq limit="6"]
<!-- /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 &amp; articles</p>
<!-- /wp:paragraph --> <!-- /wp:paragraph -->
<!-- wp:heading --> <!-- wp:heading -->
<h2 class="wp-block-heading">Short reflections on clarity, leadership, and sustainable momentum</h2> <h2 class="wp-block-heading">Short reflections on clarity, leadership, and sustainable momentum</h2>
@ -1643,17 +1900,24 @@ function coaching_mvp_home_content() {
</div></div> </div></div>
<!-- /wp:group --> <!-- /wp:group -->
<!-- wp:group {"className":"coach-section","layout":{"type":"constrained"}} --> <!-- wp:group {"className":"coach-section coach-final-cta","layout":{"type":"constrained"}} -->
<div class="wp-block-group coach-section"><div class="wp-block-group__inner-container"> <div class="wp-block-group coach-section coach-final-cta"><div class="wp-block-group__inner-container">
<!-- wp:html --> <!-- wp:html -->
<div class="coach-cta-band coach-grid-2"> <div class="coach-grid-2">
<div> <div>
<span class="coach-badge">Get in touch</span> <span class="coach-badge">Book a call</span>
<h2>Not sure where to start?</h2> <h2>Ready to work through the next decision with real support?</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>If the fit feels right, go straight to booking. This final CTA now makes the primary action explicit: choose a time, share your context, and start with a focused coaching conversation.</p>
<p><a class="coach-inline-link" href="/contact/">Visit the contact page</a></p> <div class="coach-final-actions">
<a class="coach-inline-link is-primary" href="/book-session/">Book a call</a>
<a class="coach-inline-link is-secondary" href="/services/">View services</a>
</div>
</div>
<div class="coach-mini-grid">
<div class="coach-mini-card"><h3>Fast next step</h3><p>Visitors can go straight from the homepage into the booking flow without needing another decision page.</p></div>
<div class="coach-mini-card"><h3>Clear expectation</h3><p>The CTA now frames booking as a call, which aligns better with a standard coaching conversion flow.</p></div>
<div class="coach-mini-card"><h3>Low-friction backup</h3><p>If someone still needs context first, the services page remains a clean secondary option.</p></div>
</div> </div>
<div>[coaching_lead_form]</div>
</div> </div>
<!-- /wp:html --> <!-- /wp:html -->
</div></div> </div></div>
@ -1949,6 +2213,69 @@ function coaching_mvp_seed_testimonials() {
} }
} }
function coaching_mvp_seed_faq_items() {
$items = [
[
'title' => 'What happens on the first call?',
'content' => 'The first call is a focused conversation about what is happening now, what feels stuck, and what kind of support would be most useful. The goal is clarity, fit, and a practical next step — not pressure.',
'menu_order' => 1,
],
[
'title' => 'Who is this coaching best for?',
'content' => 'This template is positioned for founders, executives, professionals in transition, and high-performing clients who want a calmer, clearer way to move through decisions and pressure.',
'menu_order' => 2,
],
[
'title' => 'Is this therapy, consulting, or coaching?',
'content' => 'The positioning here is for coaching. That means creating a structured space for reflection, decisions, accountability, and forward movement. It is not presented as therapy, and it is not done-for-you consulting.',
'menu_order' => 3,
],
[
'title' => 'Can I book a single session first?',
'content' => 'Yes. The services structure already supports a lower-friction first step for people who want to explore fit or work through one immediate challenge before committing to a longer container.',
'menu_order' => 4,
],
[
'title' => 'What kinds of topics can we work on?',
'content' => 'Typical themes include decision-making, leadership pressure, role transitions, communication, confidence, momentum, and creating a more sustainable way of working.',
'menu_order' => 5,
],
[
'title' => 'How do I know which offer fits best?',
'content' => 'If you already know what you need, go straight to the booking page. If you are unsure, use the services page to compare options and choose the support level that best fits the moment.',
'menu_order' => 6,
],
];
foreach ($items as $item) {
$existing = get_page_by_title($item['title'], OBJECT, 'faq_item');
$postarr = [
'post_type' => 'faq_item',
'post_status' => 'publish',
'post_title' => $item['title'],
'post_content' => $item['content'],
'menu_order' => $item['menu_order'],
];
if ($existing) {
$postarr['ID'] = $existing->ID;
wp_update_post($postarr);
} else {
wp_insert_post($postarr);
}
}
}
function coaching_mvp_ensure_faq_items() {
if (get_option('coaching_mvp_faq_seeded_version') === COACHING_MVP_TEMPLATE_VERSION) {
return;
}
coaching_mvp_seed_faq_items();
update_option('coaching_mvp_faq_seeded_version', COACHING_MVP_TEMPLATE_VERSION, false);
}
add_action('init', 'coaching_mvp_ensure_faq_items', 35);
function coaching_mvp_seed_blog_posts() { function coaching_mvp_seed_blog_posts() {
$posts = [ $posts = [
[ [
@ -2280,6 +2607,33 @@ function coaching_mvp_testimonials_shortcode($atts = []) {
} }
add_shortcode('coaching_testimonials', 'coaching_mvp_testimonials_shortcode'); add_shortcode('coaching_testimonials', 'coaching_mvp_testimonials_shortcode');
function coaching_mvp_faq_shortcode($atts = []) {
$atts = shortcode_atts(['limit' => 6], $atts, 'coaching_faq');
$items = get_posts([
'post_type' => 'faq_item',
'post_status' => 'publish',
'numberposts' => (int) $atts['limit'],
'orderby' => 'menu_order date',
'order' => 'ASC',
]);
if (!$items) {
return '<p>No FAQs yet.</p>';
}
ob_start();
echo '<div class="coach-faq-stack">';
foreach ($items as $item) {
echo '<details class="coach-faq-card coach-faq-item">';
echo '<summary>' . esc_html(get_the_title($item)) . '</summary>';
echo '<div class="coach-faq-answer">' . wp_kses_post(wpautop($item->post_content)) . '</div>';
echo '</details>';
}
echo '</div>';
return ob_get_clean();
}
add_shortcode('coaching_faq', 'coaching_mvp_faq_shortcode');
function coaching_mvp_recent_posts_shortcode($atts = []) { function coaching_mvp_recent_posts_shortcode($atts = []) {
$atts = shortcode_atts(['limit' => 3], $atts, 'coaching_recent_posts'); $atts = shortcode_atts(['limit' => 3], $atts, 'coaching_recent_posts');
$items = get_posts([ $items = get_posts([