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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
|
<?php $page_hide_title = penci_get_setting( 'penci_hide_page_title' ); $page_align_title = penci_get_setting( 'penci_page_align_post_title' ); $page_style = penci_get_setting( 'penci_page_template' ); $page_show_img = penci_get_setting( 'penci_show_page_featured_img' ); $page_hide_breadcrumb = penci_get_setting( 'penci_hide_page_breadcrumb' ); $page_hide_social_top = penci_get_setting( 'penci_hide_page_socail_share_top' ); $page_hide_social_bottom = penci_get_setting( 'penci_hide_page_socail_share_bottom' ); $page_caption_above_img = penci_get_setting( 'penci_page_caption_above_img' ); $page_show_comments = penci_get_setting( 'penci_show_page_comments' );
$page_id = get_the_ID(); $page_use_option_current = get_post_meta( $page_id, 'penci_use_option_current_page', true ); $page_hide_title_pre = get_post_meta( $page_id, 'penci_hide_page_title', true ); $page_align_title_pre = get_post_meta( $page_id, 'penci_page_align_post_title', true ); $page_style_pre = get_post_meta( $page_id, 'page_template_layout', true ); $page_hide_page_breadcrumb_pre = get_post_meta( $page_id, 'penci_hide_page_breadcrumb', true ); $page_hide_social_top_pre = get_post_meta( $page_id, 'penci_hide_page_socail_share_top', true ); $page_hide_social_bottom_pre = get_post_meta( $page_id, 'penci_hide_page_socail_share_bottom', true ); $page_show_page_featured_pre = get_post_meta( $page_id, 'penci_show_page_featured_img', true ); $page_caption_above_img_pre = get_post_meta( $page_id, 'penci_page_caption_above_img', true ); $page_show_page_comments_pre = get_post_meta( $page_id, 'penci_show_page_comments', true );
if ( ! empty( $page_use_option_current ) ) {
$page_hide_title = $page_hide_title_pre; $page_hide_social_top = $page_hide_social_top_pre; $page_style = $page_style_pre; $page_hide_social_top = $page_hide_social_top_pre; $page_hide_social_bottom = $page_hide_social_bottom_pre; $page_caption_above_img = $page_caption_above_img_pre; $page_show_comments = $page_show_page_comments_pre; $page_hide_breadcrumb = $page_hide_page_breadcrumb_pre; $page_align_title = $page_align_title_pre; $page_show_img = $page_show_page_featured_pre; }
$pre_page_style = get_post_meta( $page_id, 'page_template_layout', true ); if ( ! empty( $page_use_option_current ) && $pre_page_style ) { $page_style = $pre_page_style; }
while ( have_posts() ) : the_post(); $pheader_show = penci_check_page_title_show(); ?>
<?php if ( 'style-3' == $page_style ): ?> <?php if ( has_post_thumbnail() && $page_show_img ): ?> <div class="penci-container"> <div class="entry-media penci-entry-media"> <?php penci_the_post_thumbnail_page( 'penci-thumb-960-auto', false ); ?> </div> </div> <?php endif; ?> <?php endif; ?>
<?php if ( 'style-4' == $page_style ): ?> <div class="entry-media penci-entry-media"> <?php if ( has_post_thumbnail() && $page_show_img ): ?> <?php penci_the_post_thumbnail_page( 'penci-thumb-1920-auto', false ); ?> <?php endif; ?> </div> <?php endif; ?>
<div class="penci-container"> <div class="penci-container__content<?php penci_class_pos_sidebar_content(); ?>"> <div class="penci-wide-content penci-content-novc penci-sticky-content"> <div class="theiaStickySidebar"> <?php if ( 'style-2' == $page_style && has_post_thumbnail( $page_id ) && $page_show_img ) { echo '<div class="entry-media penci-entry-media">'; the_post_thumbnail( 'penci-thumb-960-auto' ); echo '</div>'; } ?> <div class="penci-content-post <?php echo esc_attr( $page_show_img && has_post_thumbnail() ? '' : 'hide_featured_image' ); ?>"> <?php if ( ! $page_hide_breadcrumb && ! $pheader_show ) : penci_breadcrumbs( $args = '' ); endif; ?> <article id="post-<?php the_ID(); ?>" <?php post_class( 'penci-content-current-page' ); ?>> <?php if ( ! $page_hide_title || ! $page_hide_social_top ): ?> <header class="entry-header penci-entry-header"> <?php if ( ! $page_hide_title && ! $pheader_show ) { the_title( '<h1 class="entry-title penci-entry-title penci-title-' . $page_align_title . '">', '</h1>' ); } penci_get_schema_markup( true ); ?> <?php if ( ! $page_hide_social_top ) { get_template_part( 'template-parts/social-share' ); } ?> </header> <?php endif;
if ( 'style-1' == $page_style && has_post_thumbnail() && $page_show_img ) { echo '<div class="entry-media penci-entry-media">'; the_post_thumbnail( 'penci-thumb-960-auto' ); echo '</div>'; }
?> <div class="penci-entry-content entry-content<?php echo esc_attr( ( $page_hide_breadcrumb && $page_hide_title && $page_hide_social_top ) || $pheader_show ? ' penci-entry-content-no-ptop' : '' ); ?>"> <?php $hide_ad_end_content = get_post_meta( get_the_ID(),'penci_hide_ad_end_content', true ); $hide_ad_before_content = get_post_meta( get_the_ID(), "penci_hide_ad_before_content", true );
if( 'yes' != $hide_ad_before_content ) { penci_render_google_adsense( 'penci_page_ad_before_content' ); } the_content( sprintf( wp_kses( __( 'Continue reading %s <span class="meta-nav">→</span>', 'pennews' ), array( 'span' => array( 'class' => array() ) ) ), the_title( '<span class="screen-reader-text">"', '"</span>', false ) ) );
wp_link_pages( array( 'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'pennews' ), 'after' => '</div>', ) ); if( 'yes' != $hide_ad_end_content ) { penci_render_google_adsense( 'penci_page_ad_after_content' ); } ?> </div> <?php if ( ! $page_hide_social_bottom ) { echo '<footer class="penci-entry-footer">'; get_template_part( 'template-parts/social-share' ); echo '</footer>'; } penci_entry_footer(); ?> </article> <?php if ( ( comments_open() || get_comments_number() ) && $page_show_comments ) { comments_template(); } endwhile; // End of the loop. ?> </div> </div> </div> <?php get_sidebar( 'second' ); ?> <?php get_sidebar(); ?> </div> </div>
|