404.php 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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 Shoreditch
  8. */
  9. get_header(); ?>
  10. <div class="site-content-wrapper">
  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.', 'shoreditch' ); ?></h1>
  16. </header><!-- .page-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?', 'shoreditch' ); ?></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 ( shoreditch_categorized_blog() ) :
  24. ?>
  25. <div class="widget widget_categories">
  26. <h2 class="widget-title"><?php esc_html_e( 'Most Used Categories', 'shoreditch' ); ?></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><!-- .widget -->
  39. <?php
  40. endif;
  41. /* translators: %1$s: smiley */
  42. $archive_content = '<p>' . sprintf( esc_html__( 'Try looking in the monthly archives. %1$s', 'shoreditch' ), convert_smilies( ':)' ) ) . '</p>';
  43. the_widget( 'WP_Widget_Archives', 'dropdown=1', "after_title=</h2>$archive_content" );
  44. the_widget( 'WP_Widget_Tag_Cloud' );
  45. ?>
  46. </div><!-- .page-content -->
  47. </section><!-- .error-404 -->
  48. </main><!-- #main -->
  49. </div><!-- #primary -->
  50. <?php get_sidebar(); ?>
  51. </div><!-- .site-content-wrapper -->
  52. <?php
  53. get_sidebar( 'footer' );
  54. get_footer();