Files
Rogers_Motors_Theme/404.php
2024-03-20 17:38:18 -04:00

74 lines
2.7 KiB
PHP

<?php
/**
* 404 Error template.
*
* @package ThemeStarter
*/
?>
<!-- Get Header -->
<?php get_header(); ?>
<section class="h-full overflow-scroll no-scrollbar bg-white pt-16 pb-24">
<div class="flex flex-col justify-center">
<div class="flex flex-col items-center py-8 justify-center">
<!-- Logo -->
<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(); ?>/icon.png" alt="MGP Logo">
<h1 class="text-2xl p-4">Page not found...</h1>
</div>
</a>
</div>
<!-- Go Home -->
<div class="flex items-center justify-center my-4">
<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>
<!-- Category Pages Section -->
<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>
</div>
<ul class="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-2 max-w-7xl mx-auto">
<?php $pages = get_pages_as_array();
foreach ($pages as $page) {
$pageID = $page['page']->ID;
$pageTitle = $page['page']->post_title;
$pageSlug = $page['page']->post_name;
$pageBG = $page['page']->post_name . '.png';
$pageBootstrapIcon = get_field('bootstrap_icon', $page['page']->ID);
?>
<li class="category-cards flex rounded-md shadow-md relative border border-stone-500 overflow-hidden w-full">
<a class="relative w-full text-center py-10 space-y-2 flex items-center flex-col justify-center" href="<?php echo $pageSlug ?>">
<div class="absolute inset-0 flex items-center justify-center bg-opacity-50 rounded-md py-2 px-2">
<!-- <i class="<?php echo $pageBootstrapIcon ?> text-2xl" aria-hidden="true"></i> -->
<h2 class="text-sm font-medium"><?php echo $pageTitle ?></h2>
<!-- <p class="font-medium lg:text-center"><?php echo get_field('description', $pageID); ?></p> -->
</div>
</a>
</li>
<?php } ?>
</ul>
</div>
</div>
</section>
<!-- Get Footer -->
<?php get_footer(); ?>