search complete
This commit is contained in:
68
search.php
68
search.php
@@ -1,22 +1,59 @@
|
||||
<!-- Get Header -->
|
||||
<?php get_header(); ?>
|
||||
|
||||
<section class="h-full overflow-scroll no-scrollbar bg-white pt-28 pb-32">
|
||||
<section class="h-full overflow-scroll no-scrollbar bg-white pt-16 pb-24">
|
||||
|
||||
<div class="h-screen lg:h-full flex flex-col justify-center">
|
||||
<div class="flex flex-col">
|
||||
|
||||
<div class="flex flex-col items-center py-8 justify-center">
|
||||
|
||||
<a class="flex flex-col items-center space-x-4" href="<?php echo get_site_url(); ?>">
|
||||
<p class="px-4 py-2 bg-red-500 text-white shadow-md rounded-md">Error 404</p>
|
||||
<div class="flex items-center justify-center">
|
||||
<img width="40px" src="<?php echo get_template_directory_uri(); ?>/assets/images/logos/header__logo.png" alt="NAN Logo">
|
||||
<h1 class="text-2xl p-4">Page not found...</h1>
|
||||
</div>
|
||||
<div class="flex flex-col items-center justify-center">
|
||||
|
||||
<a class="flex items-center space-x-2 p-4" href="<?php echo get_site_url(); ?>">
|
||||
<img width="40px" src="<?php echo get_template_directory_uri(); ?>/assets/images/logos/header__logo.png" alt="NAN Logo">
|
||||
<h1 class="text-2xl">Search</h1>
|
||||
</a>
|
||||
|
||||
<?php
|
||||
$numberOfPostsFound = count($posts);
|
||||
?>
|
||||
|
||||
<div class="w-full bg-blue-500 p-4 text-white">
|
||||
<p class="text-2xl max-w-7xl mx-auto">Results for "<?= esc_html(get_search_query(false)) ?>" (<?= $numberOfPostsFound ?>)</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="px-2 py-4 bg-cadet-200">
|
||||
<div class="py-8">
|
||||
<?php if (have_posts()) { ?>
|
||||
|
||||
<ul class="relative max-w-7xl mx-auto space-y-4 px-4">
|
||||
<?php while (have_posts()) {
|
||||
the_post(); ?>
|
||||
|
||||
<li class="w-full">
|
||||
<div>
|
||||
<a class="font-medium underline" href="<?= the_permalink() ?>">
|
||||
<?= the_title() ?>
|
||||
<?php /** ddd($posts); */ ?>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
</ul> <?php } else { ?>
|
||||
|
||||
<div class="w-full px-4">
|
||||
<p class="max-w-7xl mx-auto text-2xl">
|
||||
No results for "<?= esc_html(get_search_query(false)) ?>"
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="px-2 pt-4 pb-8 bg-cadet-200">
|
||||
<div class="flex items-center justify-center">
|
||||
<h1 class="font-medium text-2xl p-4">Visit category pages</h1>
|
||||
<i class="bi-arrow-down inline font-medium text-2xl p-4"></i>
|
||||
@@ -44,15 +81,6 @@
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-center my-8">
|
||||
<a class="flex flex-col items-center space-x-4" href="<?php echo get_site_url(); ?>">
|
||||
<div class="flex items-center justify-center">
|
||||
<h1 class="font-medium text-2xl p-4">Go home</h1>
|
||||
<i class="bi-house-fill inline font-medium text-2xl p-4"></i>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
Reference in New Issue
Block a user