Skip to content

Commit d71a7e5

Browse files
hook faqs to search results
1 parent 5cd612e commit d71a7e5

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

src/inc/acf-json/post_type_66e1db36db2a5.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"description": "",
4646
"public": true,
4747
"hierarchical": true,
48-
"exclude_from_search": true,
48+
"exclude_from_search": false,
4949
"publicly_queryable": true,
5050
"show_ui": true,
5151
"show_in_menu": true,
@@ -85,5 +85,5 @@
8585
"delete_with_user": false,
8686
"register_meta_box_cb": "",
8787
"enter_title_here": "",
88-
"modified": 1740579848
88+
"modified": 1741980856
8989
}

src/search.php

+13-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@
4747

4848
<article class="post">
4949
<header>
50+
<?php if (get_post_type() != 'faq_item') : ?>
5051
<h2><a href="<?php echo the_permalink(); ?>"><?php the_title(); ?></a></h2>
52+
<?php else : ?>
53+
<h2><a href="/faqs/#<?php echo (str_replace(' ', '-', strtolower($post->post_title))); ?>"><?php the_title(); ?></a></h2>
54+
<?php endif; ?>
5155

5256
<?php if ( get_field('authorship' ) ) : ?>
5357
<span class="byline">by
@@ -84,9 +88,17 @@
8488
<?php endif; ?>
8589

8690
<span class="type">
87-
<?php echo get_post_type(); ?>
91+
<?php
92+
if (get_post_type() != 'faq_item') {
93+
echo get_post_type();
94+
} else {
95+
echo 'FAQ';
96+
}
97+
?>
8898
</span>
8999

100+
101+
90102
</header>
91103

92104
<?php if ( has_post_thumbnail() ) : ?>

0 commit comments

Comments
 (0)