Edit File by line
/home/barbar84/public_h.../wp-conte.../themes/Divi
File: single.php
<?php
[0] Fix | Delete
[1] Fix | Delete
get_header();
[2] Fix | Delete
[3] Fix | Delete
$show_default_title = get_post_meta( get_the_ID(), '_et_pb_show_title', true );
[4] Fix | Delete
[5] Fix | Delete
$is_page_builder_used = et_pb_is_pagebuilder_used( get_the_ID() );
[6] Fix | Delete
[7] Fix | Delete
?>
[8] Fix | Delete
[9] Fix | Delete
<div id="main-content">
[10] Fix | Delete
<?php
[11] Fix | Delete
if ( et_builder_is_product_tour_enabled() ):
[12] Fix | Delete
// load fullwidth page in Product Tour mode
[13] Fix | Delete
while ( have_posts() ): the_post(); ?>
[14] Fix | Delete
[15] Fix | Delete
<article id="post-<?php the_ID(); ?>" <?php post_class( 'et_pb_post' ); ?>>
[16] Fix | Delete
<div class="entry-content">
[17] Fix | Delete
<?php
[18] Fix | Delete
the_content();
[19] Fix | Delete
?>
[20] Fix | Delete
</div> <!-- .entry-content -->
[21] Fix | Delete
[22] Fix | Delete
</article> <!-- .et_pb_post -->
[23] Fix | Delete
[24] Fix | Delete
<?php endwhile;
[25] Fix | Delete
else:
[26] Fix | Delete
?>
[27] Fix | Delete
<div class="container">
[28] Fix | Delete
<div id="content-area" class="clearfix">
[29] Fix | Delete
<div id="left-area">
[30] Fix | Delete
<?php while ( have_posts() ) : the_post(); ?>
[31] Fix | Delete
<?php
[32] Fix | Delete
/**
[33] Fix | Delete
* Fires before the title and post meta on single posts.
[34] Fix | Delete
*
[35] Fix | Delete
* @since 3.18.8
[36] Fix | Delete
*/
[37] Fix | Delete
do_action( 'et_before_post' );
[38] Fix | Delete
?>
[39] Fix | Delete
<article id="post-<?php the_ID(); ?>" <?php post_class( 'et_pb_post' ); ?>>
[40] Fix | Delete
<?php if ( ( 'off' !== $show_default_title && $is_page_builder_used ) || ! $is_page_builder_used ) { ?>
[41] Fix | Delete
<div class="et_post_meta_wrapper">
[42] Fix | Delete
<h1 class="entry-title"><?php the_title(); ?></h1>
[43] Fix | Delete
[44] Fix | Delete
<?php
[45] Fix | Delete
if ( ! post_password_required() ) :
[46] Fix | Delete
[47] Fix | Delete
et_divi_post_meta();
[48] Fix | Delete
[49] Fix | Delete
$thumb = '';
[50] Fix | Delete
[51] Fix | Delete
$width = (int) apply_filters( 'et_pb_index_blog_image_width', 1080 );
[52] Fix | Delete
[53] Fix | Delete
$height = (int) apply_filters( 'et_pb_index_blog_image_height', 675 );
[54] Fix | Delete
$classtext = 'et_featured_image';
[55] Fix | Delete
$titletext = get_the_title();
[56] Fix | Delete
$alttext = get_post_meta( get_post_thumbnail_id(), '_wp_attachment_image_alt', true );
[57] Fix | Delete
$thumbnail = get_thumbnail( $width, $height, $classtext, $alttext, $titletext, false, 'Blogimage' );
[58] Fix | Delete
$thumb = $thumbnail["thumb"];
[59] Fix | Delete
[60] Fix | Delete
$post_format = et_pb_post_format();
[61] Fix | Delete
[62] Fix | Delete
if ( 'video' === $post_format && false !== ( $first_video = et_get_first_video() ) ) {
[63] Fix | Delete
printf(
[64] Fix | Delete
'<div class="et_main_video_container">
[65] Fix | Delete
%1$s
[66] Fix | Delete
</div>',
[67] Fix | Delete
et_core_esc_previously( $first_video )
[68] Fix | Delete
);
[69] Fix | Delete
} else if ( ! in_array( $post_format, array( 'gallery', 'link', 'quote' ) ) && 'on' === et_get_option( 'divi_thumbnails', 'on' ) && '' !== $thumb ) {
[70] Fix | Delete
print_thumbnail( $thumb, $thumbnail["use_timthumb"], $alttext, $width, $height );
[71] Fix | Delete
} else if ( 'gallery' === $post_format ) {
[72] Fix | Delete
et_pb_gallery_images();
[73] Fix | Delete
}
[74] Fix | Delete
?>
[75] Fix | Delete
[76] Fix | Delete
<?php
[77] Fix | Delete
$text_color_class = et_divi_get_post_text_color();
[78] Fix | Delete
[79] Fix | Delete
$inline_style = et_divi_get_post_bg_inline_style();
[80] Fix | Delete
[81] Fix | Delete
switch ( $post_format ) {
[82] Fix | Delete
case 'audio' :
[83] Fix | Delete
$audio_player = et_pb_get_audio_player();
[84] Fix | Delete
[85] Fix | Delete
if ( $audio_player ) {
[86] Fix | Delete
printf(
[87] Fix | Delete
'<div class="et_audio_content%1$s"%2$s>
[88] Fix | Delete
%3$s
[89] Fix | Delete
</div>',
[90] Fix | Delete
esc_attr( $text_color_class ),
[91] Fix | Delete
et_core_esc_previously( $inline_style ),
[92] Fix | Delete
et_core_esc_previously( $audio_player )
[93] Fix | Delete
);
[94] Fix | Delete
}
[95] Fix | Delete
[96] Fix | Delete
break;
[97] Fix | Delete
case 'quote' :
[98] Fix | Delete
printf(
[99] Fix | Delete
'<div class="et_quote_content%2$s"%3$s>
[100] Fix | Delete
%1$s
[101] Fix | Delete
</div> <!-- .et_quote_content -->',
[102] Fix | Delete
et_core_esc_previously( et_get_blockquote_in_content() ),
[103] Fix | Delete
esc_attr( $text_color_class ),
[104] Fix | Delete
et_core_esc_previously( $inline_style )
[105] Fix | Delete
);
[106] Fix | Delete
[107] Fix | Delete
break;
[108] Fix | Delete
case 'link' :
[109] Fix | Delete
printf(
[110] Fix | Delete
'<div class="et_link_content%3$s"%4$s>
[111] Fix | Delete
<a href="%1$s" class="et_link_main_url">%2$s</a>
[112] Fix | Delete
</div> <!-- .et_link_content -->',
[113] Fix | Delete
esc_url( et_get_link_url() ),
[114] Fix | Delete
esc_html( et_get_link_url() ),
[115] Fix | Delete
esc_attr( $text_color_class ),
[116] Fix | Delete
et_core_esc_previously( $inline_style )
[117] Fix | Delete
);
[118] Fix | Delete
[119] Fix | Delete
break;
[120] Fix | Delete
}
[121] Fix | Delete
[122] Fix | Delete
endif;
[123] Fix | Delete
?>
[124] Fix | Delete
</div> <!-- .et_post_meta_wrapper -->
[125] Fix | Delete
<?php } ?>
[126] Fix | Delete
[127] Fix | Delete
<div class="entry-content">
[128] Fix | Delete
<?php
[129] Fix | Delete
do_action( 'et_before_content' );
[130] Fix | Delete
[131] Fix | Delete
the_content();
[132] Fix | Delete
[133] Fix | Delete
wp_link_pages( array( 'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'Divi' ), 'after' => '</div>' ) );
[134] Fix | Delete
?>
[135] Fix | Delete
</div> <!-- .entry-content -->
[136] Fix | Delete
<div class="et_post_meta_wrapper">
[137] Fix | Delete
<?php
[138] Fix | Delete
if ( et_get_option('divi_468_enable') === 'on' ){
[139] Fix | Delete
echo '<div class="et-single-post-ad">';
[140] Fix | Delete
if ( et_get_option('divi_468_adsense') !== '' ) echo et_core_intentionally_unescaped( et_core_fix_unclosed_html_tags( et_get_option('divi_468_adsense') ), 'html' );
[141] Fix | Delete
else { ?>
[142] Fix | Delete
<a href="<?php echo esc_url(et_get_option('divi_468_url')); ?>"><img src="<?php echo esc_attr(et_get_option('divi_468_image')); ?>" alt="468" class="foursixeight" /></a>
[143] Fix | Delete
<?php }
[144] Fix | Delete
echo '</div> <!-- .et-single-post-ad -->';
[145] Fix | Delete
}
[146] Fix | Delete
[147] Fix | Delete
/**
[148] Fix | Delete
* Fires after the post content on single posts.
[149] Fix | Delete
*
[150] Fix | Delete
* @since 3.18.8
[151] Fix | Delete
*/
[152] Fix | Delete
do_action( 'et_after_post' );
[153] Fix | Delete
[154] Fix | Delete
if ( ( comments_open() || get_comments_number() ) && 'on' === et_get_option( 'divi_show_postcomments', 'on' ) ) {
[155] Fix | Delete
comments_template( '', true );
[156] Fix | Delete
}
[157] Fix | Delete
?>
[158] Fix | Delete
</div> <!-- .et_post_meta_wrapper -->
[159] Fix | Delete
</article> <!-- .et_pb_post -->
[160] Fix | Delete
[161] Fix | Delete
<?php endwhile; ?>
[162] Fix | Delete
</div> <!-- #left-area -->
[163] Fix | Delete
[164] Fix | Delete
<?php get_sidebar(); ?>
[165] Fix | Delete
</div> <!-- #content-area -->
[166] Fix | Delete
</div> <!-- .container -->
[167] Fix | Delete
<?php endif; ?>
[168] Fix | Delete
</div> <!-- #main-content -->
[169] Fix | Delete
[170] Fix | Delete
<?php
[171] Fix | Delete
[172] Fix | Delete
get_footer();
[173] Fix | Delete
[174] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function