-
Notifications
You must be signed in to change notification settings - Fork 9
/
single.php
72 lines (55 loc) · 1.35 KB
/
single.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?php
/**
* This is a generic template for Posts
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
*
* @package CAWeb
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
global $post;
$caweb_is_page_builder_used = caweb_is_divi_used();
/**
* Loads CAWeb <header> tag.
*/
get_header();
while ( have_posts() ) :
the_post();
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php
if ( 'on' === get_post_meta( $post->ID, 'ca_custom_post_title_display', true ) ) {
print esc_html( the_title( '<!-- Page Title--><h1 class="page-title">', '</h1>' ) );
}
if ( get_option( 'ca_default_post_date_display', false ) && ! $caweb_is_page_builder_used ) {
printf( '<p class="page-date text-muted">Published: <time datetime="%1$s">%1$s</time></p>', get_the_date( 'M d, Y' ) );
}
?>
<div class="entry-content">
<?php
the_content();
if ( ! $caweb_is_page_builder_used ) {
wp_link_pages(
array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'Divi' ),
'after' => '</div>',
)
);
}
?>
</div>
<?php
/* This defaults to the Divi Comments.php template file */
if ( ! $caweb_is_page_builder_used && comments_open() ) {
comments_template( '', true );
}
?>
</article>
<?php
endwhile;
/**
* Loads footer
*/
get_footer();