|
| 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 WP_Bootstrap_4 |
| 8 | + */ |
| 9 | + |
| 10 | +get_header(); ?> |
| 11 | + |
| 12 | +<?php |
| 13 | + $default_sidebar_position = get_theme_mod( 'default_sidebar_position', 'right' ); |
| 14 | +?> |
| 15 | + |
| 16 | + <div class="container"> |
| 17 | + <div class="row"> |
| 18 | + |
| 19 | + <?php if ( $default_sidebar_position === 'no' ) : ?> |
| 20 | + <div class="col-md-12 wp-bp-content-width"> |
| 21 | + <?php else : ?> |
| 22 | + <div class="col-md-8 wp-bp-content-width"> |
| 23 | + <?php endif; ?> |
| 24 | + |
| 25 | + <div id="primary" class="content-area wp-bp-404"> |
| 26 | + <main id="main" class="site-main"> |
| 27 | + |
| 28 | + <div class="card mt-3r"> |
| 29 | + <div class="card-body"> |
| 30 | + <section class="error-404 not-found"> |
| 31 | + <header class="page-header"> |
| 32 | + <h1 class="page-title"><?php esc_html_e( 'Oops! That page can’t be found.', 'wp-bootstrap-4' ); ?></h1> |
| 33 | + </header><!-- .page-header --> |
| 34 | + |
| 35 | + <div class="page-content"> |
| 36 | + <p><?php esc_html_e( 'It looks like nothing was found at this location. Maybe try one of the links below or a search?', 'wp-bootstrap-4' ); ?></p> |
| 37 | + |
| 38 | + <?php |
| 39 | + get_search_form(); |
| 40 | + |
| 41 | + the_widget( 'WP_Widget_Recent_Posts', array(), array( |
| 42 | + 'before_title' => '<h5 class="widget-title mt-4">', |
| 43 | + 'after_title' => '</h5>', |
| 44 | + ) ); |
| 45 | + ?> |
| 46 | + |
| 47 | + <div class="widget widget_categories"> |
| 48 | + <h5 class="widget-title"><?php esc_html_e( 'Most Used Categories', 'wp-bootstrap-4' ); ?></h5> |
| 49 | + <ul> |
| 50 | + <?php |
| 51 | + wp_list_categories( array( |
| 52 | + 'orderby' => 'count', |
| 53 | + 'order' => 'DESC', |
| 54 | + 'show_count' => 1, |
| 55 | + 'title_li' => '', |
| 56 | + 'number' => 10, |
| 57 | + ) ); |
| 58 | + ?> |
| 59 | + </ul> |
| 60 | + </div><!-- .widget --> |
| 61 | + |
| 62 | + <?php |
| 63 | + |
| 64 | + the_widget( 'WP_Widget_Archives', 'dropdown=1', array( |
| 65 | + 'before_title' => '<h5 class="widget-title">', |
| 66 | + 'after_title' => '</h5>', |
| 67 | + ) ); |
| 68 | + |
| 69 | + the_widget( 'WP_Widget_Tag_Cloud', array(), array( |
| 70 | + 'before_title' => '<h5 class="widget-title">', |
| 71 | + 'after_title' => '</h5>', |
| 72 | + ) ); |
| 73 | + ?> |
| 74 | + |
| 75 | + </div><!-- .page-content --> |
| 76 | + </section><!-- .error-404 --> |
| 77 | + </div> |
| 78 | + <!-- /.card-body --> |
| 79 | + </div> |
| 80 | + <!-- /.card --> |
| 81 | + |
| 82 | + </main><!-- #main --> |
| 83 | + </div><!-- #primary --> |
| 84 | + </div> |
| 85 | + <!-- /.col-md-8 --> |
| 86 | + |
| 87 | + <?php if ( $default_sidebar_position != 'no' ) : ?> |
| 88 | + <?php if ( $default_sidebar_position === 'right' ) : ?> |
| 89 | + <div class="col-md-4 wp-bp-sidebar-width"> |
| 90 | + <?php elseif ( $default_sidebar_position === 'left' ) : ?> |
| 91 | + <div class="col-md-4 order-md-first wp-bp-sidebar-width"> |
| 92 | + <?php endif; ?> |
| 93 | + <?php get_sidebar(); ?> |
| 94 | + </div> |
| 95 | + <!-- /.col-md-4 --> |
| 96 | + <?php endif; ?> |
| 97 | + </div> |
| 98 | + <!-- /.row --> |
| 99 | + </div> |
| 100 | + <!-- /.container --> |
| 101 | +<?php |
| 102 | +get_footer(); |
0 commit comments