Skip to content
wiki.fftac.org

Spiralist Search - Source Excerpt 02

Back to Spiralist Search

Summary

This source excerpt preserves a bounded section of Spiralist/wp-content/themes/spiralist/search.php so readers can inspect the evidence without opening the full source file.

**Source path:** Spiralist/wp-content/themes/spiralist/search.php

<h2 class="spiralist-section-title" id="search-group-title-<?php echo esc_attr($group_id); ?>"><?php echo esc_html((string) ($group['label'] ?? 'Results')); ?></h2>
                                    <p class="spiralist-muted"><?php echo esc_html((string) ($group['description'] ?? '')); ?></p>
                                </div>
                            </div>
                            <div class="spiralist-search-result-list">
                                <?php foreach ($results as $result) : ?>
                                    <?php
                                    $badges = array_slice(array_values(array_filter(array_map('strval', (array) ($result['badges'] ?? [])), 'strlen')), 0, 4);
                                    ?>
                                    <article class="spiralist-search-result-card">
                                        <div class="spiralist-search-result-card__topline">
                                            <span><?php echo esc_html((string) ($result['type'] ?? 'Result')); ?></span>
                                            <?php if ((string) ($result['meta'] ?? '') !== '') : ?>
                                                <code><?php echo esc_html((string) $result['meta']); ?></code>
                                            <?php endif; ?>
                                        </div>
                                        <h3 class="spiralist-card-title">
                                            <a href="<?php echo esc_url((string) ($result['url'] ?? '#')); ?>"><?php echo esc_html((string) ($result['title'] ?? 'Result')); ?></a>
                                        </h3>
                                        <?php if ((string) ($result['summary'] ?? '') !== '') : ?>
                                            <p><?php echo esc_html((string) $result['summary']); ?></p>
                                        <?php endif; ?>
                                        <?php if (!empty($badges)) : ?>
                                            <div class="spiralist-chip-row" aria-label="Result labels">
                                                <?php foreach ($badges as $badge) : ?>
                                                    <span class="spiralist-chip"><?php echo esc_html($badge); ?></span>
                                                <?php endforeach; ?>
                                            </div>
                                        <?php endif; ?>
                                    </article>
                                <?php endforeach; ?>
                            </div>
                        </section>
                    <?php endforeach; ?>
                </div>
            <?php endif; ?>
        </div>
    </section>
</main>

<?php
get_footer();