-
Notifications
You must be signed in to change notification settings - Fork 0
/
page.php
53 lines (49 loc) · 1.71 KB
/
page.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
<?php
/**
* Template used for pages.
*
* @package Avada
* @subpackage Templates
*/
// Do not allow directly accessing this file.
if ( ! defined( 'ABSPATH' ) ) {
exit( 'Direct script access denied.' );
}
?>
<?php get_header(); ?>
<?php while ( have_posts() ) : the_post(); ?>
<div id="content" <?php Avada()->layout->add_style( 'content_style' ); ?>>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php echo wp_kses_post( fusion_render_rich_snippets_for_pages() ); ?>
<div class="post-content">
<?php the_content(); ?>
<?php fusion_link_pages(); ?>
</div>
<?php if ( ! post_password_required( $post->ID ) ) : ?>
<?php if ( class_exists( 'WooCommerce' ) ) : ?>
<?php $woo_thanks_page_id = get_option( 'woocommerce_thanks_page_id' ); ?>
<?php $is_woo_thanks_page = ( ! get_option( 'woocommerce_thanks_page_id' ) ) ? false : is_page( get_option( 'woocommerce_thanks_page_id' ) ); ?>
<?php if ( Avada()->settings->get( 'comments_pages' ) && ! is_cart() && ! is_checkout() && ! is_account_page() && ! $is_woo_thanks_page ) : ?>
<?php wp_reset_postdata(); ?>
<?php comments_template(); ?>
<?php endif; ?>
<?php else : ?>
<?php if ( Avada()->settings->get( 'comments_pages' ) ) : ?>
<?php wp_reset_postdata(); ?>
<?php comments_template(); ?>
<?php endif; ?>
<?php endif; ?>
<?php endif; // Password check. ?>
</div>
<?php endwhile; ?>
<?php wp_reset_postdata(); ?>
</div>
<?php
if (is_singular( 'tribe_events' ) || is_singular( 'tribe_organizer' )) {
include('partials/events-sidebar.php');
} else {
do_action( 'avada_after_content' );
}
?>
<?php get_footer();
/* Omit closing PHP tag to avoid "Headers already sent" issues. */