@lebtiga/sonic-agent 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +223 -0
- package/README.md +61 -0
- package/bin/sonic.js +304 -0
- package/lib/index.js +20 -0
- package/lib/installer.js +156 -0
- package/lib/license.js +48 -0
- package/package.json +46 -0
- package/plugin/.claude-plugin/plugin.json +13 -0
- package/plugin/README.md +100 -0
- package/plugin/agents/sonic.md +80 -0
- package/plugin/commands/sonic-build.md +145 -0
- package/plugin/commands/sonic-help.md +71 -0
- package/plugin/skills/accessibility-qa/SKILL.md +160 -0
- package/plugin/skills/accessibility-qa/templates/accessibility-qa-report-template.md +123 -0
- package/plugin/skills/accessibility-qa/templates/wcag-compliance-statement.md +70 -0
- package/plugin/skills/aka-wireframe-wp/SKILL.md +149 -0
- package/plugin/skills/aka-wireframe-wp/assets/aka-framework-theme/README.md +190 -0
- package/plugin/skills/aka-wireframe-wp/assets/aka-framework-theme/footer.php +49 -0
- package/plugin/skills/aka-wireframe-wp/assets/aka-framework-theme/functions.php +395 -0
- package/plugin/skills/aka-wireframe-wp/assets/aka-framework-theme/header.php +58 -0
- package/plugin/skills/aka-wireframe-wp/assets/aka-framework-theme/index.php +39 -0
- package/plugin/skills/aka-wireframe-wp/assets/aka-framework-theme/page-answer.php +62 -0
- package/plugin/skills/aka-wireframe-wp/assets/aka-framework-theme/page-authority-hub.php +122 -0
- package/plugin/skills/aka-wireframe-wp/assets/aka-framework-theme/page-knowledge.php +58 -0
- package/plugin/skills/aka-wireframe-wp/assets/aka-framework-theme/style.css +633 -0
- package/plugin/skills/aka-wireframe-wp/references/content-generator.md +371 -0
- package/plugin/skills/aka-wireframe-wp/references/internal-linker.md +430 -0
- package/plugin/skills/aka-wireframe-wp/references/orchestrator.md +269 -0
- package/plugin/skills/aka-wireframe-wp/references/prompts-library.md +880 -0
- package/plugin/skills/aka-wireframe-wp/references/seo-optimizer.md +433 -0
- package/plugin/skills/aka-wireframe-wp/references/strategy-planner.md +317 -0
- package/plugin/skills/aka-wireframe-wp/references/wordpress-deployer.md +545 -0
- package/plugin/skills/authority-site-builder/SKILL.md +138 -0
- package/plugin/skills/brand-philosophy/SKILL.md +77 -0
- package/plugin/skills/freepik-spaces/SKILL.md +122 -0
- package/plugin/skills/freepik-spaces/docs/automation-guide.md +233 -0
- package/plugin/skills/freepik-spaces/docs/research-notes.md +264 -0
- package/plugin/skills/freepik-spaces/plans/naseberry-demo-plan.md +320 -0
- package/plugin/skills/freepik-spaces/templates/naseberry-demo.json +302 -0
- package/plugin/skills/freepik-spaces/templates/saas-demo.json +212 -0
- package/plugin/skills/frontend-design/LICENSE.txt +177 -0
- package/plugin/skills/frontend-design/SKILL.md +77 -0
- package/plugin/skills/programmatic-seo/SKILL.md +236 -0
- package/plugin/skills/programmatic-seo/references/playbooks.md +293 -0
- package/plugin/skills/seo-qa/SKILL.md +132 -0
- package/plugin/skills/seo-qa/templates/schema-localbusiness.json +49 -0
- package/plugin/skills/seo-qa/templates/schema-service.json +36 -0
- package/plugin/skills/seo-qa/templates/seo-qa-report-template.md +90 -0
- package/plugin/skills/visual-identity/SKILL.md +109 -0
- package/plugin/skills/visual-identity/templates/style-guide-template.md +108 -0
- package/plugin/skills/website-image-gen/SKILL.md +82 -0
- package/plugin/skills/website-image-gen/templates/blog-featured.md +56 -0
- package/plugin/skills/website-image-gen/templates/hero-service-photo.md +56 -0
- package/plugin/skills/wordpress-pro/SKILL.md +105 -0
- package/plugin/skills/wordpress-pro/references/gutenberg-blocks.md +870 -0
- package/plugin/skills/wordpress-pro/references/hooks-filters.md +845 -0
- package/plugin/skills/wordpress-pro/references/performance-security.md +1012 -0
- package/plugin/skills/wordpress-pro/references/plugin-architecture.md +1041 -0
- package/plugin/skills/wordpress-pro/references/theme-development.md +858 -0
- package/plugin/sops/SOP-Sonic 777/authority-site-sop.html +1100 -0
- package/plugin/sops/SOP-WORDPRESS-330-PAGE-SITES.md +926 -0
- package/scripts/postinstall.js +109 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
</main><!-- .site-content -->
|
|
2
|
+
|
|
3
|
+
<footer class="site-footer">
|
|
4
|
+
<div class="container">
|
|
5
|
+
<div class="footer-content">
|
|
6
|
+
<div class="footer-widget">
|
|
7
|
+
<h3><?php bloginfo( 'name' ); ?></h3>
|
|
8
|
+
<p><?php bloginfo( 'description' ); ?></p>
|
|
9
|
+
<?php if ( get_theme_mod( 'aka_phone' ) ) : ?>
|
|
10
|
+
<p>
|
|
11
|
+
<strong>Phone:</strong>
|
|
12
|
+
<a href="tel:<?php echo esc_attr( get_theme_mod( 'aka_phone' ) ); ?>">
|
|
13
|
+
<?php echo esc_html( get_theme_mod( 'aka_phone' ) ); ?>
|
|
14
|
+
</a>
|
|
15
|
+
</p>
|
|
16
|
+
<?php endif; ?>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<?php if ( has_nav_menu( 'footer' ) ) : ?>
|
|
20
|
+
<div class="footer-widget">
|
|
21
|
+
<h3>Quick Links</h3>
|
|
22
|
+
<?php
|
|
23
|
+
wp_nav_menu( array(
|
|
24
|
+
'theme_location' => 'footer',
|
|
25
|
+
'menu_class' => 'footer-menu',
|
|
26
|
+
'container' => false,
|
|
27
|
+
'depth' => 1,
|
|
28
|
+
) );
|
|
29
|
+
?>
|
|
30
|
+
</div>
|
|
31
|
+
<?php endif; ?>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
<div class="site-info">
|
|
35
|
+
<p>
|
|
36
|
+
© <?php echo date( 'Y' ); ?> <?php bloginfo( 'name' ); ?>. All rights reserved.
|
|
37
|
+
<?php if ( function_exists( 'the_privacy_policy_link' ) ) : ?>
|
|
38
|
+
| <?php the_privacy_policy_link(); ?>
|
|
39
|
+
<?php endif; ?>
|
|
40
|
+
</p>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</footer>
|
|
44
|
+
</div><!-- .site-container -->
|
|
45
|
+
|
|
46
|
+
<?php wp_footer(); ?>
|
|
47
|
+
|
|
48
|
+
</body>
|
|
49
|
+
</html>
|
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
/**
|
|
3
|
+
* AKA Framework Theme Functions
|
|
4
|
+
*
|
|
5
|
+
* @package AKA_Framework
|
|
6
|
+
* @version 1.0.0
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
// Exit if accessed directly
|
|
10
|
+
if ( ! defined( 'ABSPATH' ) ) {
|
|
11
|
+
exit;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Theme Setup
|
|
16
|
+
*/
|
|
17
|
+
function aka_framework_setup() {
|
|
18
|
+
// Add theme support
|
|
19
|
+
add_theme_support( 'title-tag' );
|
|
20
|
+
add_theme_support( 'post-thumbnails' );
|
|
21
|
+
add_theme_support( 'html5', array(
|
|
22
|
+
'search-form',
|
|
23
|
+
'comment-form',
|
|
24
|
+
'comment-list',
|
|
25
|
+
'gallery',
|
|
26
|
+
'caption',
|
|
27
|
+
) );
|
|
28
|
+
add_theme_support( 'custom-logo' );
|
|
29
|
+
add_theme_support( 'automatic-feed-links' );
|
|
30
|
+
|
|
31
|
+
// Register navigation menus
|
|
32
|
+
register_nav_menus( array(
|
|
33
|
+
'primary' => __( 'Primary Menu', 'aka-framework' ),
|
|
34
|
+
'footer' => __( 'Footer Menu', 'aka-framework' ),
|
|
35
|
+
) );
|
|
36
|
+
}
|
|
37
|
+
add_action( 'after_setup_theme', 'aka_framework_setup' );
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Enqueue Styles and Scripts
|
|
41
|
+
*/
|
|
42
|
+
function aka_framework_scripts() {
|
|
43
|
+
// Main stylesheet
|
|
44
|
+
wp_enqueue_style(
|
|
45
|
+
'aka-framework-style',
|
|
46
|
+
get_stylesheet_uri(),
|
|
47
|
+
array(),
|
|
48
|
+
'1.0.0'
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
// Mobile responsive
|
|
52
|
+
wp_add_inline_style( 'aka-framework-style', '
|
|
53
|
+
@media (max-width: 768px) {
|
|
54
|
+
body { font-size: 16px; }
|
|
55
|
+
}
|
|
56
|
+
' );
|
|
57
|
+
}
|
|
58
|
+
add_action( 'wp_enqueue_scripts', 'aka_framework_scripts' );
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Register Page Templates
|
|
62
|
+
*/
|
|
63
|
+
function aka_framework_page_templates( $templates ) {
|
|
64
|
+
$templates['page-authority-hub.php'] = 'Authority Hub';
|
|
65
|
+
$templates['page-knowledge.php'] = 'Knowledge Page';
|
|
66
|
+
$templates['page-answer.php'] = 'Answer Page';
|
|
67
|
+
|
|
68
|
+
return $templates;
|
|
69
|
+
}
|
|
70
|
+
add_filter( 'theme_page_templates', 'aka_framework_page_templates' );
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Get Hub Navigation - Lists all child pages
|
|
74
|
+
*/
|
|
75
|
+
function aka_get_hub_navigation( $parent_id = 0 ) {
|
|
76
|
+
if ( ! $parent_id ) {
|
|
77
|
+
$parent_id = get_the_ID();
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// Get child pages
|
|
81
|
+
$children = get_pages( array(
|
|
82
|
+
'child_of' => $parent_id,
|
|
83
|
+
'sort_column' => 'menu_order, post_title',
|
|
84
|
+
'post_status' => 'publish'
|
|
85
|
+
) );
|
|
86
|
+
|
|
87
|
+
if ( empty( $children ) ) {
|
|
88
|
+
return '';
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// Group by template type
|
|
92
|
+
$knowledge_pages = array();
|
|
93
|
+
$answer_pages = array();
|
|
94
|
+
|
|
95
|
+
foreach ( $children as $child ) {
|
|
96
|
+
$template = get_page_template_slug( $child->ID );
|
|
97
|
+
|
|
98
|
+
if ( $template === 'page-knowledge.php' ) {
|
|
99
|
+
$knowledge_pages[] = $child;
|
|
100
|
+
} elseif ( $template === 'page-answer.php' ) {
|
|
101
|
+
$answer_pages[] = $child;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
ob_start();
|
|
106
|
+
?>
|
|
107
|
+
<div class="hub-sidebar">
|
|
108
|
+
<?php if ( ! empty( $knowledge_pages ) ) : ?>
|
|
109
|
+
<h3>Knowledge Base</h3>
|
|
110
|
+
<ul>
|
|
111
|
+
<?php foreach ( $knowledge_pages as $page ) : ?>
|
|
112
|
+
<li>
|
|
113
|
+
<a href="<?php echo get_permalink( $page->ID ); ?>">
|
|
114
|
+
<?php echo esc_html( $page->post_title ); ?>
|
|
115
|
+
</a>
|
|
116
|
+
</li>
|
|
117
|
+
<?php endforeach; ?>
|
|
118
|
+
</ul>
|
|
119
|
+
<?php endif; ?>
|
|
120
|
+
|
|
121
|
+
<?php if ( ! empty( $answer_pages ) ) : ?>
|
|
122
|
+
<h3>Common Questions</h3>
|
|
123
|
+
<ul>
|
|
124
|
+
<?php
|
|
125
|
+
// Show first 10 answer pages
|
|
126
|
+
$displayed = 0;
|
|
127
|
+
foreach ( $answer_pages as $page ) :
|
|
128
|
+
if ( $displayed >= 10 ) break;
|
|
129
|
+
?>
|
|
130
|
+
<li>
|
|
131
|
+
<a href="<?php echo get_permalink( $page->ID ); ?>">
|
|
132
|
+
<?php echo esc_html( $page->post_title ); ?>
|
|
133
|
+
</a>
|
|
134
|
+
</li>
|
|
135
|
+
<?php
|
|
136
|
+
$displayed++;
|
|
137
|
+
endforeach;
|
|
138
|
+
?>
|
|
139
|
+
</ul>
|
|
140
|
+
<?php endif; ?>
|
|
141
|
+
</div>
|
|
142
|
+
<?php
|
|
143
|
+
return ob_get_clean();
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Get Breadcrumbs
|
|
148
|
+
*/
|
|
149
|
+
function aka_get_breadcrumbs() {
|
|
150
|
+
$breadcrumbs = array();
|
|
151
|
+
|
|
152
|
+
// Add home
|
|
153
|
+
$breadcrumbs[] = '<a href="' . home_url() . '">Home</a>';
|
|
154
|
+
|
|
155
|
+
// Get ancestors
|
|
156
|
+
$ancestors = array_reverse( get_post_ancestors( get_the_ID() ) );
|
|
157
|
+
foreach ( $ancestors as $ancestor ) {
|
|
158
|
+
$breadcrumbs[] = '<a href="' . get_permalink( $ancestor ) . '">' . get_the_title( $ancestor ) . '</a>';
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// Current page
|
|
162
|
+
$breadcrumbs[] = '<span>' . get_the_title() . '</span>';
|
|
163
|
+
|
|
164
|
+
return '<div class="breadcrumbs">' . implode( ' <span>></span> ', $breadcrumbs ) . '</div>';
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Get Related Topics (sibling pages)
|
|
169
|
+
*/
|
|
170
|
+
function aka_get_related_topics() {
|
|
171
|
+
$parent_id = wp_get_post_parent_id( get_the_ID() );
|
|
172
|
+
|
|
173
|
+
if ( ! $parent_id ) {
|
|
174
|
+
return '';
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// Get sibling pages (same parent, same template)
|
|
178
|
+
$current_template = get_page_template_slug( get_the_ID() );
|
|
179
|
+
|
|
180
|
+
$siblings = get_pages( array(
|
|
181
|
+
'child_of' => $parent_id,
|
|
182
|
+
'exclude' => get_the_ID(),
|
|
183
|
+
'sort_column' => 'menu_order, post_title',
|
|
184
|
+
'post_status' => 'publish'
|
|
185
|
+
) );
|
|
186
|
+
|
|
187
|
+
// Filter by same template type
|
|
188
|
+
$related = array();
|
|
189
|
+
foreach ( $siblings as $sibling ) {
|
|
190
|
+
if ( get_page_template_slug( $sibling->ID ) === $current_template ) {
|
|
191
|
+
$related[] = $sibling;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
if ( empty( $related ) ) {
|
|
196
|
+
return '';
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
ob_start();
|
|
200
|
+
?>
|
|
201
|
+
<div class="related-topics">
|
|
202
|
+
<h2>Related Topics</h2>
|
|
203
|
+
<div class="topic-grid">
|
|
204
|
+
<?php
|
|
205
|
+
// Show max 6 related topics
|
|
206
|
+
$count = 0;
|
|
207
|
+
foreach ( $related as $page ) :
|
|
208
|
+
if ( $count >= 6 ) break;
|
|
209
|
+
?>
|
|
210
|
+
<div class="topic-card">
|
|
211
|
+
<h3>
|
|
212
|
+
<a href="<?php echo get_permalink( $page->ID ); ?>">
|
|
213
|
+
<?php echo esc_html( $page->post_title ); ?>
|
|
214
|
+
</a>
|
|
215
|
+
</h3>
|
|
216
|
+
<?php if ( $page->post_excerpt ) : ?>
|
|
217
|
+
<p><?php echo esc_html( $page->post_excerpt ); ?></p>
|
|
218
|
+
<?php endif; ?>
|
|
219
|
+
</div>
|
|
220
|
+
<?php
|
|
221
|
+
$count++;
|
|
222
|
+
endforeach;
|
|
223
|
+
?>
|
|
224
|
+
</div>
|
|
225
|
+
</div>
|
|
226
|
+
<?php
|
|
227
|
+
return ob_get_clean();
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Get Related Questions (for Answer pages)
|
|
232
|
+
*/
|
|
233
|
+
function aka_get_related_questions() {
|
|
234
|
+
$parent_id = wp_get_post_parent_id( get_the_ID() );
|
|
235
|
+
|
|
236
|
+
if ( ! $parent_id ) {
|
|
237
|
+
return '';
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
// Get other answer pages under same parent
|
|
241
|
+
$answers = get_pages( array(
|
|
242
|
+
'child_of' => $parent_id,
|
|
243
|
+
'exclude' => get_the_ID(),
|
|
244
|
+
'sort_column' => 'menu_order, post_title',
|
|
245
|
+
'post_status' => 'publish'
|
|
246
|
+
) );
|
|
247
|
+
|
|
248
|
+
// Filter to only Answer pages
|
|
249
|
+
$related_answers = array();
|
|
250
|
+
foreach ( $answers as $answer ) {
|
|
251
|
+
if ( get_page_template_slug( $answer->ID ) === 'page-answer.php' ) {
|
|
252
|
+
$related_answers[] = $answer;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
if ( empty( $related_answers ) ) {
|
|
257
|
+
return '';
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
ob_start();
|
|
261
|
+
?>
|
|
262
|
+
<div class="related-questions">
|
|
263
|
+
<h2>Related Questions</h2>
|
|
264
|
+
<ul>
|
|
265
|
+
<?php
|
|
266
|
+
// Show first 5 related questions
|
|
267
|
+
$count = 0;
|
|
268
|
+
foreach ( $related_answers as $question ) :
|
|
269
|
+
if ( $count >= 5 ) break;
|
|
270
|
+
?>
|
|
271
|
+
<li>
|
|
272
|
+
<a href="<?php echo get_permalink( $question->ID ); ?>">
|
|
273
|
+
<?php echo esc_html( $question->post_title ); ?>
|
|
274
|
+
</a>
|
|
275
|
+
</li>
|
|
276
|
+
<?php
|
|
277
|
+
$count++;
|
|
278
|
+
endforeach;
|
|
279
|
+
?>
|
|
280
|
+
</ul>
|
|
281
|
+
</div>
|
|
282
|
+
<?php
|
|
283
|
+
return ob_get_clean();
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Get CTA Box
|
|
288
|
+
*/
|
|
289
|
+
function aka_get_cta_box( $title = '', $description = '', $button_text = 'Contact Us', $button_url = '' ) {
|
|
290
|
+
if ( ! $title ) {
|
|
291
|
+
$title = 'Ready to Get Started?';
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
if ( ! $description ) {
|
|
295
|
+
$description = 'Contact us today for a free consultation.';
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
if ( ! $button_url ) {
|
|
299
|
+
$button_url = home_url( '/contact/' );
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
ob_start();
|
|
303
|
+
?>
|
|
304
|
+
<div class="cta-box">
|
|
305
|
+
<h3><?php echo esc_html( $title ); ?></h3>
|
|
306
|
+
<p><?php echo esc_html( $description ); ?></p>
|
|
307
|
+
<a href="<?php echo esc_url( $button_url ); ?>" class="cta-button">
|
|
308
|
+
<?php echo esc_html( $button_text ); ?>
|
|
309
|
+
</a>
|
|
310
|
+
</div>
|
|
311
|
+
<?php
|
|
312
|
+
return ob_get_clean();
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Custom excerpt length
|
|
317
|
+
*/
|
|
318
|
+
function aka_excerpt_length( $length ) {
|
|
319
|
+
return 30;
|
|
320
|
+
}
|
|
321
|
+
add_filter( 'excerpt_length', 'aka_excerpt_length' );
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Custom excerpt more
|
|
325
|
+
*/
|
|
326
|
+
function aka_excerpt_more( $more ) {
|
|
327
|
+
return '...';
|
|
328
|
+
}
|
|
329
|
+
add_filter( 'excerpt_more', 'aka_excerpt_more' );
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* Add page slug as body class
|
|
333
|
+
*/
|
|
334
|
+
function aka_body_classes( $classes ) {
|
|
335
|
+
global $post;
|
|
336
|
+
|
|
337
|
+
if ( isset( $post ) ) {
|
|
338
|
+
$classes[] = 'page-' . $post->post_name;
|
|
339
|
+
|
|
340
|
+
// Add template class
|
|
341
|
+
$template = get_page_template_slug();
|
|
342
|
+
if ( $template ) {
|
|
343
|
+
$classes[] = str_replace( '.php', '', $template );
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
return $classes;
|
|
348
|
+
}
|
|
349
|
+
add_filter( 'body_class', 'aka_body_classes' );
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* Customizer Settings
|
|
353
|
+
*/
|
|
354
|
+
function aka_customize_register( $wp_customize ) {
|
|
355
|
+
// Phone Number
|
|
356
|
+
$wp_customize->add_setting( 'aka_phone', array(
|
|
357
|
+
'default' => '',
|
|
358
|
+
'sanitize_callback' => 'sanitize_text_field',
|
|
359
|
+
) );
|
|
360
|
+
|
|
361
|
+
$wp_customize->add_control( 'aka_phone', array(
|
|
362
|
+
'label' => __( 'Phone Number', 'aka-framework' ),
|
|
363
|
+
'section' => 'title_tagline',
|
|
364
|
+
'type' => 'text',
|
|
365
|
+
) );
|
|
366
|
+
|
|
367
|
+
// Primary Color
|
|
368
|
+
$wp_customize->add_setting( 'aka_primary_color', array(
|
|
369
|
+
'default' => '#2563eb',
|
|
370
|
+
'sanitize_callback' => 'sanitize_hex_color',
|
|
371
|
+
) );
|
|
372
|
+
|
|
373
|
+
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'aka_primary_color', array(
|
|
374
|
+
'label' => __( 'Primary Color', 'aka-framework' ),
|
|
375
|
+
'section' => 'colors',
|
|
376
|
+
'settings' => 'aka_primary_color',
|
|
377
|
+
) ) );
|
|
378
|
+
}
|
|
379
|
+
add_action( 'customize_register', 'aka_customize_register' );
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* Output custom colors in head
|
|
383
|
+
*/
|
|
384
|
+
function aka_custom_colors() {
|
|
385
|
+
$primary_color = get_theme_mod( 'aka_primary_color', '#2563eb' );
|
|
386
|
+
|
|
387
|
+
?>
|
|
388
|
+
<style type="text/css">
|
|
389
|
+
:root {
|
|
390
|
+
--primary-color: <?php echo esc_attr( $primary_color ); ?>;
|
|
391
|
+
}
|
|
392
|
+
</style>
|
|
393
|
+
<?php
|
|
394
|
+
}
|
|
395
|
+
add_action( 'wp_head', 'aka_custom_colors' );
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html <?php language_attributes(); ?>>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="<?php bloginfo( 'charset' ); ?>">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<link rel="profile" href="https://gmpg.org/xfn/11">
|
|
7
|
+
<?php wp_head(); ?>
|
|
8
|
+
</head>
|
|
9
|
+
|
|
10
|
+
<body <?php body_class(); ?>>
|
|
11
|
+
<?php wp_body_open(); ?>
|
|
12
|
+
|
|
13
|
+
<div class="site-container">
|
|
14
|
+
<header class="site-header">
|
|
15
|
+
<div class="container">
|
|
16
|
+
<div class="site-branding">
|
|
17
|
+
<?php if ( has_custom_logo() ) : ?>
|
|
18
|
+
<?php the_custom_logo(); ?>
|
|
19
|
+
<?php endif; ?>
|
|
20
|
+
|
|
21
|
+
<div>
|
|
22
|
+
<?php if ( is_front_page() ) : ?>
|
|
23
|
+
<h1 class="site-title">
|
|
24
|
+
<a href="<?php echo esc_url( home_url( '/' ) ); ?>">
|
|
25
|
+
<?php bloginfo( 'name' ); ?>
|
|
26
|
+
</a>
|
|
27
|
+
</h1>
|
|
28
|
+
<?php else : ?>
|
|
29
|
+
<p class="site-title">
|
|
30
|
+
<a href="<?php echo esc_url( home_url( '/' ) ); ?>">
|
|
31
|
+
<?php bloginfo( 'name' ); ?>
|
|
32
|
+
</a>
|
|
33
|
+
</p>
|
|
34
|
+
<?php endif; ?>
|
|
35
|
+
|
|
36
|
+
<?php
|
|
37
|
+
$description = get_bloginfo( 'description', 'display' );
|
|
38
|
+
if ( $description || is_customize_preview() ) :
|
|
39
|
+
?>
|
|
40
|
+
<p class="site-description"><?php echo $description; ?></p>
|
|
41
|
+
<?php endif; ?>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<nav class="main-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Primary menu', 'aka-framework' ); ?>">
|
|
46
|
+
<?php
|
|
47
|
+
wp_nav_menu( array(
|
|
48
|
+
'theme_location' => 'primary',
|
|
49
|
+
'menu_class' => 'primary-menu',
|
|
50
|
+
'container' => false,
|
|
51
|
+
'fallback_cb' => false,
|
|
52
|
+
) );
|
|
53
|
+
?>
|
|
54
|
+
</nav>
|
|
55
|
+
</div>
|
|
56
|
+
</header>
|
|
57
|
+
|
|
58
|
+
<main class="site-content" role="main">
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
/**
|
|
3
|
+
* The main template file
|
|
4
|
+
*
|
|
5
|
+
* @package AKA_Framework
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
get_header();
|
|
9
|
+
?>
|
|
10
|
+
|
|
11
|
+
<div class="container">
|
|
12
|
+
<div class="content-area">
|
|
13
|
+
<?php
|
|
14
|
+
if ( have_posts() ) :
|
|
15
|
+
while ( have_posts() ) :
|
|
16
|
+
the_post();
|
|
17
|
+
?>
|
|
18
|
+
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
|
19
|
+
<header class="entry-header">
|
|
20
|
+
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
|
|
21
|
+
</header>
|
|
22
|
+
|
|
23
|
+
<div class="entry-content">
|
|
24
|
+
<?php the_content(); ?>
|
|
25
|
+
</div>
|
|
26
|
+
</article>
|
|
27
|
+
<?php
|
|
28
|
+
endwhile;
|
|
29
|
+
else :
|
|
30
|
+
?>
|
|
31
|
+
<p><?php esc_html_e( 'No content found.', 'aka-framework' ); ?></p>
|
|
32
|
+
<?php
|
|
33
|
+
endif;
|
|
34
|
+
?>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
<?php
|
|
39
|
+
get_footer();
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
/**
|
|
3
|
+
* Template Name: Answer Page
|
|
4
|
+
* Template for Answer/FAQ pages in the AKA framework
|
|
5
|
+
* Optimized for featured snippets
|
|
6
|
+
*
|
|
7
|
+
* @package AKA_Framework
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
get_header();
|
|
11
|
+
?>
|
|
12
|
+
|
|
13
|
+
<div class="answer-page">
|
|
14
|
+
<div class="container">
|
|
15
|
+
<?php
|
|
16
|
+
while ( have_posts() ) :
|
|
17
|
+
the_post();
|
|
18
|
+
|
|
19
|
+
// Display breadcrumbs
|
|
20
|
+
echo aka_get_breadcrumbs();
|
|
21
|
+
?>
|
|
22
|
+
|
|
23
|
+
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
|
24
|
+
<header class="page-header">
|
|
25
|
+
<h1><?php the_title(); ?></h1>
|
|
26
|
+
</header>
|
|
27
|
+
|
|
28
|
+
<?php
|
|
29
|
+
// Extract first paragraph as "Quick Answer" if excerpt exists
|
|
30
|
+
if ( has_excerpt() ) :
|
|
31
|
+
?>
|
|
32
|
+
<div class="quick-answer">
|
|
33
|
+
<h2>Quick Answer</h2>
|
|
34
|
+
<?php the_excerpt(); ?>
|
|
35
|
+
</div>
|
|
36
|
+
<?php endif; ?>
|
|
37
|
+
|
|
38
|
+
<div class="answer-content entry-content">
|
|
39
|
+
<?php the_content(); ?>
|
|
40
|
+
</div>
|
|
41
|
+
</article>
|
|
42
|
+
|
|
43
|
+
<?php
|
|
44
|
+
// Display related questions
|
|
45
|
+
echo aka_get_related_questions();
|
|
46
|
+
|
|
47
|
+
// Display CTA
|
|
48
|
+
echo aka_get_cta_box(
|
|
49
|
+
'Have More Questions?',
|
|
50
|
+
'Contact us for personalized answers to your specific situation.',
|
|
51
|
+
'Ask Us Now'
|
|
52
|
+
);
|
|
53
|
+
?>
|
|
54
|
+
|
|
55
|
+
<?php
|
|
56
|
+
endwhile;
|
|
57
|
+
?>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
|
|
61
|
+
<?php
|
|
62
|
+
get_footer();
|