>
'before' ) );
}
while ( have_posts() ) {
the_post();
$content_area_id = us_get_page_area_id( 'content' );
if ( $content_area_id != '' AND get_post_status( $content_area_id ) != FALSE ) {
us_load_template( 'templates/content' );
} else {
$the_content = apply_filters( 'the_content', get_the_content() );
// The page may be paginated itself via tags
$pagination = wp_link_pages(
array(
'before' => '',
'link_before' => '',
'link_after' => '',
'echo' => 0,
)
);
// If content has no sections, we'll create them manually
$has_own_sections = ( strpos( $the_content, ' class="l-section' ) !== FALSE );
if ( ! ( function_exists( 'vc_is_page_editable' ) AND vc_is_page_editable() ) AND ( ! $has_own_sections OR get_post_type() == 'tribe_events' ) ) {
$the_content = '' . $the_content . $pagination . '
';
} elseif ( ! empty( $pagination ) ) {
$the_content .= '';
}
echo $the_content;
// Post comments
if ( comments_open() OR get_comments_number() != '0' ) {
$show_comments = TRUE;
// Check comments option of Events Calendar plugin
if ( function_exists( 'tribe_get_option' ) AND get_post_type() == 'tribe_events' ) {
$show_comments = tribe_get_option( 'showComments' );
}
if ( $show_comments ) {
?>
'after' ) );
}
do_action( 'us_after_page' );
?>