What Terms Does The Blog Search

  • Ah great to know. Thank you thank you thank you for all your help hus_hmd

    For anyone else looking for the final code for all this, here's how to create your blog search:

    Your master page calls the search content, Blog specific, sorted, using a template:

    1. <?php
    2. perch_content_search(perch_get('q'), [
    3. 'apps' => ['PerchBlog'],
    4. 'sort' => 'postDateTime',
    5. 'sort-order' => 'ASC',
    6. 'count' => '9',
    7. 'template'=>'search-result.html',
    8. ]);
    9. ?>

    That template is search-result.html:

    Now the key to connecting everything is in the Layout referenced, blog_search_result.php:

    Which references this last template, post_search_result.html:

    Note the "urlify" links which reuse existing name of the author to make the slug link.