404.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?php
  2. /**
  3. * The template for displaying 404 pages (not found).
  4. *
  5. * @package Pique
  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.', 'pique' ); ?></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?', 'pique' ); ?></p>
  16. <?php get_search_form(); ?>
  17. <?php the_widget( 'WP_Widget_Recent_Posts', array( 'number' => 7 ), array(
  18. 'before_title' => '<h2 class="widget-title">',
  19. 'after_title' => '</h2>',
  20. ) ); ?>
  21. <?php if ( pique_categorized_blog() ) : // Only show the widget if site has multiple categories. ?>
  22. <div class="widget widget_categories">
  23. <h2 class="widget-title"><?php esc_html_e( 'Most Used Categories', 'pique' ); ?></h2>
  24. <ul>
  25. <?php
  26. wp_list_categories( array(
  27. 'orderby' => 'count',
  28. 'order' => 'DESC',
  29. 'show_count' => 1,
  30. 'title_li' => '',
  31. 'number' => 10,
  32. ) );
  33. ?>
  34. </ul>
  35. </div><!-- .widget -->
  36. <?php endif; ?>
  37. <?php
  38. /* translators: %1$s: smiley */
  39. $archive_content = '<p>' . sprintf( esc_html__( 'Try looking in the monthly archives. %1$s', 'pique' ), convert_smilies( ':)' ) ) . '</p>';
  40. the_widget( 'WP_Widget_Archives', array( 'count' => 1 ), array(
  41. 'before_title' => '<h2 class="widget-title">',
  42. 'after_title' => '</h2>',
  43. ) );
  44. ?>
  45. <?php
  46. the_widget( 'WP_Widget_Tag_Cloud', '', array(
  47. 'before_title' => '<h2 class="widget-title">',
  48. 'after_title' => '</h2>',
  49. ) );
  50. ?>
  51. </div><!-- .page-content -->
  52. </section><!-- .error-404 -->
  53. </main><!-- #main -->
  54. </div><!-- #primary -->
  55. <?php get_sidebar(); ?>
  56. <?php get_footer(); ?>