404.php 1.5 KB

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