404.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. /**
  3. * The template for displaying 404 pages (not found).
  4. *
  5. * @link https://codex.wordpress.org/Creating_an_Error_404_Page
  6. *
  7. * @package Toujours
  8. */
  9. get_header(); ?>
  10. <div id="primary" class="content-area">
  11. <main id="main" class="site-main" role="main">
  12. <section class="error-404 not-found">
  13. <header class="page-header">
  14. <h1 class="page-title"><?php esc_html_e( 'Oops! That page can&rsquo;t be found.', 'toujours' ); ?></h1>
  15. </header><!-- .page-header -->
  16. <div class="page-content">
  17. <p><?php esc_html_e( 'It looks like nothing was found at this location. Maybe try one of the links below or a search?', 'toujours' ); ?></p>
  18. <?php get_search_form(); ?>
  19. <?php the_widget( 'WP_Widget_Recent_Posts' ); ?>
  20. <?php if ( toujours_categorized_blog() ) : // Only show the widget if site has multiple categories. ?>
  21. <div class="widget widget_categories">
  22. <h2 class="widget-title"><?php esc_html_e( 'Most Used Categories', 'toujours' ); ?></h2>
  23. <ul>
  24. <?php
  25. wp_list_categories( array(
  26. 'orderby' => 'count',
  27. 'order' => 'DESC',
  28. 'show_count' => 1,
  29. 'title_li' => '',
  30. 'number' => 10,
  31. ) );
  32. ?>
  33. </ul>
  34. </div><!-- .widget -->
  35. <?php endif; ?>
  36. <?php
  37. $archive_content = '<p>' . esc_html__( 'Try looking in the monthly archives.', 'toujours' ) . '</p>';
  38. the_widget( 'WP_Widget_Archives', 'dropdown=1', "after_title=</h2>$archive_content" );
  39. ?>
  40. <?php the_widget( 'WP_Widget_Tag_Cloud' ); ?>
  41. </div><!-- .page-content -->
  42. </section><!-- .error-404 -->
  43. </main><!-- #main -->
  44. </div><!-- #primary -->
  45. <?php get_footer(); ?>