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 photos
  8. */
  9. get_header();
  10. ?>
  11. <div id="primary" class="content-area">
  12. <main id="main" class="site-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.', 'photos' ); ?></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?', 'photos' ); ?></p>
  19. <?php
  20. get_search_form();
  21. the_widget( 'WP_Widget_Recent_Posts' );
  22. ?>
  23. <div class="widget widget_categories">
  24. <h2 class="widget-title"><?php esc_html_e( 'Most Used Categories', 'photos' ); ?></h2>
  25. <ul>
  26. <?php
  27. wp_list_categories( array(
  28. 'orderby' => 'count',
  29. 'order' => 'DESC',
  30. 'show_count' => 1,
  31. 'title_li' => '',
  32. 'number' => 10,
  33. ) );
  34. ?>
  35. </ul>
  36. </div><!-- .widget -->
  37. <?php
  38. /* translators: %1$s: smiley */
  39. $photos_archive_content = '<p>' . sprintf( esc_html__( 'Try looking in the monthly archives. %1$s', 'photos' ), convert_smilies( ':)' ) ) . '</p>';
  40. the_widget( 'WP_Widget_Archives', 'dropdown=1', "after_title=</h2>$photos_archive_content" );
  41. the_widget( 'WP_Widget_Tag_Cloud' );
  42. ?>
  43. </div><!-- .page-content -->
  44. </section><!-- .error-404 -->
  45. </main><!-- #main -->
  46. </div><!-- #primary -->
  47. <?php
  48. get_footer();