404.php 1.8 KB

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