Edit File by line
/home/barbar84/www/wp-conte.../themes/twentytw.../template...
File: content-cover.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Displays the content when the cover template is used.
[2] Fix | Delete
*
[3] Fix | Delete
* @package WordPress
[4] Fix | Delete
* @subpackage Twenty_Twenty
[5] Fix | Delete
* @since Twenty Twenty 1.0
[6] Fix | Delete
*/
[7] Fix | Delete
[8] Fix | Delete
?>
[9] Fix | Delete
[10] Fix | Delete
<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
[11] Fix | Delete
<?php
[12] Fix | Delete
// On the cover page template, output the cover header.
[13] Fix | Delete
$cover_header_style = '';
[14] Fix | Delete
$cover_header_classes = '';
[15] Fix | Delete
[16] Fix | Delete
$color_overlay_style = '';
[17] Fix | Delete
$color_overlay_classes = '';
[18] Fix | Delete
[19] Fix | Delete
$image_url = ! post_password_required() ? get_the_post_thumbnail_url( get_the_ID(), 'twentytwenty-fullscreen' ) : '';
[20] Fix | Delete
[21] Fix | Delete
if ( $image_url ) {
[22] Fix | Delete
$cover_header_style = ' style="background-image: url( ' . esc_url( $image_url ) . ' );"';
[23] Fix | Delete
$cover_header_classes = ' bg-image';
[24] Fix | Delete
}
[25] Fix | Delete
[26] Fix | Delete
// Get the color used for the color overlay.
[27] Fix | Delete
$color_overlay_color = get_theme_mod( 'cover_template_overlay_background_color' );
[28] Fix | Delete
if ( $color_overlay_color ) {
[29] Fix | Delete
$color_overlay_style = ' style="color: ' . esc_attr( $color_overlay_color ) . ';"';
[30] Fix | Delete
} else {
[31] Fix | Delete
$color_overlay_style = '';
[32] Fix | Delete
}
[33] Fix | Delete
[34] Fix | Delete
// Get the fixed background attachment option.
[35] Fix | Delete
if ( get_theme_mod( 'cover_template_fixed_background', true ) ) {
[36] Fix | Delete
$cover_header_classes .= ' bg-attachment-fixed';
[37] Fix | Delete
}
[38] Fix | Delete
[39] Fix | Delete
// Get the opacity of the color overlay.
[40] Fix | Delete
$color_overlay_opacity = get_theme_mod( 'cover_template_overlay_opacity' );
[41] Fix | Delete
$color_overlay_opacity = ( false === $color_overlay_opacity ) ? 80 : $color_overlay_opacity;
[42] Fix | Delete
$color_overlay_classes .= ' opacity-' . $color_overlay_opacity;
[43] Fix | Delete
?>
[44] Fix | Delete
[45] Fix | Delete
<div class="cover-header <?php echo $cover_header_classes; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- static output ?>"<?php echo $cover_header_style; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- We need to double check this, but for now, we want to pass PHPCS ;) ?>>
[46] Fix | Delete
<div class="cover-header-inner-wrapper screen-height">
[47] Fix | Delete
<div class="cover-header-inner">
[48] Fix | Delete
<div class="cover-color-overlay color-accent<?php echo esc_attr( $color_overlay_classes ); ?>"<?php echo $color_overlay_style; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- We need to double check this, but for now, we want to pass PHPCS ;) ?>></div>
[49] Fix | Delete
[50] Fix | Delete
<header class="entry-header has-text-align-center">
[51] Fix | Delete
<div class="entry-header-inner section-inner medium">
[52] Fix | Delete
[53] Fix | Delete
<?php
[54] Fix | Delete
[55] Fix | Delete
/**
[56] Fix | Delete
* Allow child themes and plugins to filter the display of the categories in the article header.
[57] Fix | Delete
*
[58] Fix | Delete
* @since Twenty Twenty 1.0
[59] Fix | Delete
*
[60] Fix | Delete
* @param bool Whether to show the categories in article header, Default true.
[61] Fix | Delete
*/
[62] Fix | Delete
$show_categories = apply_filters( 'twentytwenty_show_categories_in_entry_header', true );
[63] Fix | Delete
[64] Fix | Delete
if ( true === $show_categories && has_category() ) {
[65] Fix | Delete
?>
[66] Fix | Delete
[67] Fix | Delete
<div class="entry-categories">
[68] Fix | Delete
<span class="screen-reader-text"><?php _e( 'Categories', 'twentytwenty' ); ?></span>
[69] Fix | Delete
<div class="entry-categories-inner">
[70] Fix | Delete
<?php the_category( ' ' ); ?>
[71] Fix | Delete
</div><!-- .entry-categories-inner -->
[72] Fix | Delete
</div><!-- .entry-categories -->
[73] Fix | Delete
[74] Fix | Delete
<?php
[75] Fix | Delete
}
[76] Fix | Delete
[77] Fix | Delete
the_title( '<h1 class="entry-title">', '</h1>' );
[78] Fix | Delete
[79] Fix | Delete
if ( is_page() ) {
[80] Fix | Delete
?>
[81] Fix | Delete
[82] Fix | Delete
<div class="to-the-content-wrapper">
[83] Fix | Delete
[84] Fix | Delete
<a href="#post-inner" class="to-the-content fill-children-current-color">
[85] Fix | Delete
<?php twentytwenty_the_theme_svg( 'arrow-down' ); ?>
[86] Fix | Delete
<div class="screen-reader-text"><?php _e( 'Scroll Down', 'twentytwenty' ); ?></div>
[87] Fix | Delete
</a><!-- .to-the-content -->
[88] Fix | Delete
[89] Fix | Delete
</div><!-- .to-the-content-wrapper -->
[90] Fix | Delete
[91] Fix | Delete
<?php
[92] Fix | Delete
} else {
[93] Fix | Delete
[94] Fix | Delete
$intro_text_width = '';
[95] Fix | Delete
[96] Fix | Delete
if ( is_singular() ) {
[97] Fix | Delete
$intro_text_width = ' small';
[98] Fix | Delete
} else {
[99] Fix | Delete
$intro_text_width = ' thin';
[100] Fix | Delete
}
[101] Fix | Delete
[102] Fix | Delete
if ( has_excerpt() ) {
[103] Fix | Delete
?>
[104] Fix | Delete
[105] Fix | Delete
<div class="intro-text section-inner max-percentage<?php echo esc_attr( $intro_text_width ); ?>">
[106] Fix | Delete
<?php the_excerpt(); ?>
[107] Fix | Delete
</div>
[108] Fix | Delete
[109] Fix | Delete
<?php
[110] Fix | Delete
}
[111] Fix | Delete
[112] Fix | Delete
twentytwenty_the_post_meta( get_the_ID(), 'single-top' );
[113] Fix | Delete
[114] Fix | Delete
}
[115] Fix | Delete
?>
[116] Fix | Delete
[117] Fix | Delete
</div><!-- .entry-header-inner -->
[118] Fix | Delete
</header><!-- .entry-header -->
[119] Fix | Delete
[120] Fix | Delete
</div><!-- .cover-header-inner -->
[121] Fix | Delete
</div><!-- .cover-header-inner-wrapper -->
[122] Fix | Delete
</div><!-- .cover-header -->
[123] Fix | Delete
[124] Fix | Delete
<div class="post-inner" id="post-inner">
[125] Fix | Delete
[126] Fix | Delete
<div class="entry-content">
[127] Fix | Delete
[128] Fix | Delete
<?php
[129] Fix | Delete
the_content();
[130] Fix | Delete
?>
[131] Fix | Delete
[132] Fix | Delete
</div><!-- .entry-content -->
[133] Fix | Delete
<?php
[134] Fix | Delete
wp_link_pages(
[135] Fix | Delete
array(
[136] Fix | Delete
'before' => '<nav class="post-nav-links bg-light-background" aria-label="' . esc_attr__( 'Page', 'twentytwenty' ) . '"><span class="label">' . __( 'Pages:', 'twentytwenty' ) . '</span>',
[137] Fix | Delete
'after' => '</nav>',
[138] Fix | Delete
'link_before' => '<span class="page-number">',
[139] Fix | Delete
'link_after' => '</span>',
[140] Fix | Delete
)
[141] Fix | Delete
);
[142] Fix | Delete
[143] Fix | Delete
edit_post_link();
[144] Fix | Delete
// Single bottom post meta.
[145] Fix | Delete
twentytwenty_the_post_meta( get_the_ID(), 'single-bottom' );
[146] Fix | Delete
[147] Fix | Delete
if ( post_type_supports( get_post_type( get_the_ID() ), 'author' ) && is_single() ) {
[148] Fix | Delete
[149] Fix | Delete
get_template_part( 'template-parts/entry-author-bio' );
[150] Fix | Delete
[151] Fix | Delete
}
[152] Fix | Delete
?>
[153] Fix | Delete
[154] Fix | Delete
</div><!-- .post-inner -->
[155] Fix | Delete
[156] Fix | Delete
<?php
[157] Fix | Delete
[158] Fix | Delete
if ( is_single() ) {
[159] Fix | Delete
[160] Fix | Delete
get_template_part( 'template-parts/navigation' );
[161] Fix | Delete
}
[162] Fix | Delete
[163] Fix | Delete
/**
[164] Fix | Delete
* Output comments wrapper if it's a post, or if comments are open,
[165] Fix | Delete
* or if there's a comment number – and check for password.
[166] Fix | Delete
* */
[167] Fix | Delete
if ( ( is_single() || is_page() ) && ( comments_open() || get_comments_number() ) && ! post_password_required() ) {
[168] Fix | Delete
?>
[169] Fix | Delete
[170] Fix | Delete
<div class="comments-wrapper section-inner">
[171] Fix | Delete
[172] Fix | Delete
<?php comments_template(); ?>
[173] Fix | Delete
[174] Fix | Delete
</div><!-- .comments-wrapper -->
[175] Fix | Delete
[176] Fix | Delete
<?php
[177] Fix | Delete
}
[178] Fix | Delete
?>
[179] Fix | Delete
[180] Fix | Delete
</article><!-- .post -->
[181] Fix | Delete
[182] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function