[ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Summary view] [Print] [Text view]
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 Twenty Twenty 1.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 ( post_type_supports( get_post_type( get_the_ID() ), 'author' ) && 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 -->
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated : Fri Nov 15 08:20:01 2024 | Cross-referenced by PHPXref |