Avoid going in and out of PHP unnecessarily.
Closes #854 Includes minor alignment changes for easier readability/detection of start/end of conditions.
This commit is contained in:
parent
6f6de25568
commit
8470f55f92
13 changed files with 128 additions and 109 deletions
19
404.php
19
404.php
|
@ -20,11 +20,14 @@ get_header(); ?>
|
|||
<div class="page-content">
|
||||
<p><?php esc_html_e( 'It looks like nothing was found at this location. Maybe try one of the links below or a search?', '_s' ); ?></p>
|
||||
|
||||
<?php get_search_form(); ?>
|
||||
<?php
|
||||
get_search_form();
|
||||
|
||||
<?php the_widget( 'WP_Widget_Recent_Posts' ); ?>
|
||||
the_widget( 'WP_Widget_Recent_Posts' );
|
||||
|
||||
if ( _s_categorized_blog() ) : // Only show the widget if site has multiple categories.
|
||||
?>
|
||||
|
||||
<?php if ( _s_categorized_blog() ) : // Only show the widget if site has multiple categories. ?>
|
||||
<div class="widget widget_categories">
|
||||
<h2 class="widget-title"><?php esc_html_e( 'Most Used Categories', '_s' ); ?></h2>
|
||||
<ul>
|
||||
|
@ -39,15 +42,16 @@ get_header(); ?>
|
|||
?>
|
||||
</ul>
|
||||
</div><!-- .widget -->
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
endif;
|
||||
|
||||
/* translators: %1$s: smiley */
|
||||
$archive_content = '<p>' . sprintf( esc_html__( 'Try looking in the monthly archives. %1$s', '_s' ), convert_smilies( ':)' ) ) . '</p>';
|
||||
the_widget( 'WP_Widget_Archives', 'dropdown=1', "after_title=</h2>$archive_content" );
|
||||
?>
|
||||
|
||||
<?php the_widget( 'WP_Widget_Tag_Cloud' ); ?>
|
||||
the_widget( 'WP_Widget_Tag_Cloud' );
|
||||
?>
|
||||
|
||||
</div><!-- .page-content -->
|
||||
</section><!-- .error-404 -->
|
||||
|
@ -55,4 +59,5 @@ get_header(); ?>
|
|||
</main><!-- #main -->
|
||||
</div><!-- #primary -->
|
||||
|
||||
<?php get_footer(); ?>
|
||||
<?php
|
||||
get_footer();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue