404.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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 Lodestar
  8. */
  9. get_header(); ?>
  10. <div class="wrap">
  11. <div id="primary" class="content-area">
  12. <main id="main" class="site-main" role="main">
  13. <section class="error-404 not-found">
  14. <header class="page-header">
  15. <h1 class="page-title"><?php esc_html_e( 'Oops! That page can&rsquo;t be found.', 'lodestar' ); ?></h1>
  16. </header>
  17. <div class="page-content">
  18. <p><?php esc_html_e( 'It looks like nothing was found at this location. Maybe try one of the links below or a search?', 'lodestar' ); ?></p>
  19. <?php
  20. get_search_form();
  21. the_widget( 'WP_Widget_Recent_Posts' );
  22. // Only show the widget if site has multiple categories.
  23. if ( lodestar_categorized_blog() ) :
  24. ?>
  25. <div class="widget widget_categories">
  26. <h2 class="widget-title"><?php esc_html_e( 'Most Used Categories', 'lodestar' ); ?></h2>
  27. <ul>
  28. <?php
  29. wp_list_categories( array(
  30. 'orderby' => 'count',
  31. 'order' => 'DESC',
  32. 'show_count' => 1,
  33. 'title_li' => '',
  34. 'number' => 10,
  35. ) );
  36. ?>
  37. </ul>
  38. </div>
  39. <?php
  40. endif;
  41. $archive_content = '<p>' . esc_html__( 'Try looking in the monthly archives.', 'lodestar' ) . '</p>';
  42. the_widget( 'WP_Widget_Archives', 'dropdown=1', "after_title=</h2>$archive_content" );
  43. the_widget( 'WP_Widget_Tag_Cloud' );
  44. ?>
  45. </div>
  46. </section>
  47. </main>
  48. </div>
  49. </div><!-- .wrap -->
  50. <?php
  51. get_footer();