Commit 430964c3 authored by Jakob Moser's avatar Jakob Moser
Browse files

Merge branch 'make-search-function-accessible' into 'master'

Create dedicated search page

See merge request !24
parents 7c3040e2 3a381650
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
<div class="pagination">
    <div class="older-posts"><?php next_posts_link("« Ältere Posts"); ?></div>
    <div class="newer-posts"><?php previous_posts_link("Neuere Posts »"); ?></div>
</div>
+3 −5
Original line number Diff line number Diff line
@@ -50,11 +50,9 @@ get_header();
            "link_title" => true,
            "hide_default_header_image" => true
        ));
    } ?>
    }
    
    <div class="pagination">
        <div class="older-posts"><?php next_posts_link("« Ältere Posts"); ?></div>
        <div class="newer-posts"><?php previous_posts_link("Neuere Posts »"); ?></div>
    </div>
    get_template_part("components/pagination");
    ?>
</main>
<?php get_footer(); ?>

search.php

0 → 100644
+34 −0
Original line number Diff line number Diff line
<?php
/**
 * Template for the search results page.
 *
 * WordPress identifies this file by its name (which MUST be search.php)
 * and displays it whenever it has to display lists of search results.
 *
 * @see https://codex.wordpress.org/Theme_Development#Search_Results_.28search.php.29
 */

get_header();
?>
<aside class="levitating list-meta">
    <h1>Suchergebnisse</h1>
    <h2 class="search-term"><?php the_search_query(); ?></h2>
</aside>

<main class="list">
    <?php while (have_posts()) {
        the_post();
        get_template_part("components/article", null, array(
            "show_author" => false,
            "show_published_date" => true,
            "show_modified_date" => false,
            "show_only_excerpt" => true,
            "link_title" => true,
            "hide_default_header_image" => true
        ));
    } 
    
    get_template_part("components/pagination");
    ?>
</main>
<?php get_footer(); ?>
+1 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@
 * Author: personads :: Maximilian Müller-Eberstein (ursprüngliche Version und Design); Jakob Moser (Code-Rewrite)
 * Author URI: https://personads.me/
 *
 * Version: 1.8.0
 * Version: 1.9.0
 *
 * License: GNU General Public License v3.0
 * License URI: https://www.gnu.org/licenses/gpl-3.0.html