From 76d68c97f572120dc75d0501cc82acf4022d6b33 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Tue, 23 Dec 2025 20:14:14 +0000
Subject: [PATCH] =legacy rebrand finished
---
content/faq.php | 48 ++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 46 insertions(+), 2 deletions(-)
diff --git a/content/faq.php b/content/faq.php
index 505b842..a43268c 100644
--- a/content/faq.php
+++ b/content/faq.php
@@ -3,8 +3,8 @@
function altr_faq():array
{
return [
- 'singular' => 'Frequently Asked Question',
- 'plural' => 'Frequently Asked Questions',
+ 'singular' => 'FAQ',
+ 'plural' => 'FAQs',
'dash_description' => 'Manage your answers',
'capability_type' => ['faq', 'faqs'],
'breadcrumb' => 'FAQ',
@@ -39,6 +39,21 @@
],
'single_image' => false,
'upload_title' => 'Upload Before & Afters',
+ 'seo' => [
+ 'meta' => [
+ 'title' => '{{post_title}} | FAQ',
+ 'description' => '{{post_excerpt}}'
+ ],
+ 'schema' => [
+ 'type' => 'FAQPage',
+ 'question' => '{{post_title}}',
+ 'answer' => '{{post_excerpt}}',
+ ],
+ 'archive' => [
+ 'type' => 'FAQPage',
+ 'name' => 'Common Questions about Laser Tattoo Removal',
+ ],
+ ]
];
}
@@ -140,4 +155,33 @@
';
// $output = wp_add_inline_script('jvb-form', $script, 'after');
}
+}
+
+add_filter('jvbBreadcrumbs', 'altrFAQCrumbs');
+function altrFAQCrumbs(array $crumbs) {
+ if (is_singular(BASE.'faq')) {
+ $ID = get_the_ID();
+ $terms = get_the_terms($ID, BASE.'section');
+ if ($terms && !is_wp_error($terms)) {
+ $last = array_pop($crumbs);
+ $term = $terms[0];
+ $ancestors = get_ancestors($term->term_id, BASE.'section', 'taxonomy');
+ $ancestors = array_reverse($ancestors);
+ foreach ($ancestors as $ancestor) {
+ $aTerm = get_term($ancestor, BASE.'section');
+ if ($aTerm && !is_wp_error($aTerm)) {
+ $crumbs[] = [
+ 'name' => $aTerm->name,
+ 'url' => get_term_link($ancestor, BASE.'section')
+ ];
+ }
+ }
+ $crumbs[] = [
+ 'name' => $term->name,
+ 'url' => get_term_link($term, BASE.'section')
+ ];
+ $crumbs[] = $last;
+ }
+ }
+ return $crumbs;
}
\ No newline at end of file
--
Gitblit v1.10.0