Make WordPress Core

source: trunk/src/wp-content/themes/twentytwenty/template-parts/content.php @ 46711

Last change on this file since 46711 was 46711, checked in by SergeyBiryukov, 5 years ago

Twenty Twenty: Make CSS adjustments to account for the latest editor changes and ensure that group blocks work in expected ways.

Props williampatton, allancole, karmatosed, pierlo, joen, ianbelanger.
Fixes #48557.

  • Property svn:eol-style set to native
File size: 2.0 KB
Line 
1<?php
2/**
3 * The default template for displaying content
4 *
5 * Used for both singular and index.
6 *
7 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
8 *
9 * @package WordPress
10 * @subpackage Twenty_Twenty
11 * @since 1.0.0
12 */
13
14?>
15
16<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
17
18        <?php
19
20        get_template_part( 'template-parts/entry-header' );
21
22        if ( ! is_search() ) {
23                get_template_part( 'template-parts/featured-image' );
24        }
25
26        ?>
27
28        <div class="post-inner <?php echo is_page_template( 'templates/template-full-width.php' ) ? '' : 'thin'; ?> ">
29
30                <div class="entry-content">
31
32                        <?php
33                        if ( is_search() || ! is_singular() && 'summary' === get_theme_mod( 'blog_content', 'full' ) ) {
34                                the_excerpt();
35                        } else {
36                                the_content( __( 'Continue reading', 'twentytwenty' ) );
37                        }
38                        ?>
39
40                </div><!-- .entry-content -->
41
42        </div><!-- .post-inner -->
43
44        <div class="section-inner">
45                <?php
46                wp_link_pages(
47                        array(
48                                'before'      => '<nav class="post-nav-links bg-light-background" aria-label="' . esc_attr__( 'Page', 'twentytwenty' ) . '"><span class="label">' . __( 'Pages:', 'twentytwenty' ) . '</span>',
49                                'after'       => '</nav>',
50                                'link_before' => '<span class="page-number">',
51                                'link_after'  => '</span>',
52                        )
53                );
54
55                edit_post_link();
56
57                // Single bottom post meta.
58                twentytwenty_the_post_meta( get_the_ID(), 'single-bottom' );
59
60                if ( is_single() ) {
61
62                        get_template_part( 'template-parts/entry-author-bio' );
63
64                }
65                ?>
66
67        </div><!-- .section-inner -->
68
69        <?php
70
71        if ( is_single() ) {
72
73                get_template_part( 'template-parts/navigation' );
74
75        }
76
77        /**
78         *  Output comments wrapper if it's a post, or if comments are open,
79         * or if there's a comment number – and check for password.
80         * */
81        if ( ( is_single() || is_page() ) && ( comments_open() || get_comments_number() ) && ! post_password_required() ) {
82                ?>
83
84                <div class="comments-wrapper section-inner">
85
86                        <?php comments_template(); ?>
87
88                </div><!-- .comments-wrapper -->
89
90                <?php
91        }
92        ?>
93
94</article><!-- .post -->
Note: See TracBrowser for help on using the repository browser.