This repository was archived by the owner on Jul 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpage.php
More file actions
61 lines (47 loc) · 1.37 KB
/
page.php
File metadata and controls
61 lines (47 loc) · 1.37 KB
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
<?php
/**
* The template for displaying all pages.
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages
* and that other 'pages' on your WordPress site will use a
* different template.
*
* @package Lenscap
*/
// Remove automatic output of share icons on Woo pages
if ( class_exists( 'WooCommerce' ) ) {
if ( is_cart() || is_checkout() || is_shop() || is_account_page() ) {
$hide_icons = 'true';
} else {
$hide_icons = 'false';
}
} else {
$hide_icons = 'false';
}
get_header(); ?>
<div id="primary" class="content-area">
<main id="main" class="site-main">
<?php while ( have_posts() ) : the_post();
// Page content template
get_template_part( 'template-parts/content-page' );
if ( 'false' === $hide_icons && function_exists( 'sharing_display' ) || class_exists( 'Jetpack_Likes' ) ) {
echo "<div class='share-icons'>";
// Sharing Buttons
if ( function_exists( 'sharing_display' ) ) {
echo sharing_display();
}
// Likes
if ( class_exists( 'Jetpack_Likes' ) ) {
$custom_likes = new Jetpack_Likes;
echo $custom_likes->post_likes( '' );
}
echo "</div>";
}
// Comments template
comments_template();
endwhile; ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php get_sidebar();
get_footer(); ?>