Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?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 The7
- * @since 1.0.0
- */
- // File Security Check
- if ( ! defined( 'ABSPATH' ) ) {
- exit;
- }
- $config = presscore_config();
- $config->set( 'template', 'page' );
- get_header();
- ?>
- <?php if ( presscore_is_content_visible() ): ?>
- <div id="content" class="content" role="main">
- <?php
- if ( has_post_thumbnail() ) {
- $thumbnail_id = get_post_thumbnail_id();
- $video_url = esc_url( get_post_meta( $thumbnail_id, 'dt-video-url', true ) );
- if ( ! $video_url ) {
- $thumb_args = array(
- 'class' => 'alignnone',
- 'img_id' => $thumbnail_id,
- 'wrap' => '<img %IMG_CLASS% %SRC% %SIZE% %IMG_TITLE% %ALT% />',
- 'echo' => false,
- );
- // Thumbnail proportions.
- if ( 'resize' === of_get_option( 'blog-thumbnail_size' ) ) {
- $prop = of_get_option( 'blog-thumbnail_proportions' );
- $width = max( absint( $prop['width'] ), 1 );
- $height = max( absint( $prop['height'] ), 1 );
- $thumb_args['prop'] = $width / $height;
- }
- $post_media_html = presscore_get_blog_post_fancy_date();
- if ( $config->get_bool( 'post.fancy_category.enabled' ) ) {
- $post_media_html .= presscore_get_post_fancy_category();
- }
- $post_media_html .= dt_get_thumb_img( $thumb_args );
- } else {
- $post_media_html = '<div class="post-video alignnone">' . dt_get_embed( $video_url ) . '</div>';
- }
- echo '<div class="post-thumbnail">' . $post_media_html . '</div>';
- }
- if ( have_posts() ) {
- while ( have_posts() ) {
- the_post();
- do_action( 'presscore_before_loop' );
- the_content();
- wp_link_pages( array(
- 'before' => '<div class="page-links">' . __( 'Pages:', 'the7mk2' ),
- 'after' => '</div>',
- ) );
- presscore_display_share_buttons_for_post( 'page' );
- comments_template( '', true );
- }
- } else {
- get_template_part( 'no-results', 'page' );
- }
- ?>
- </div><!-- #content -->
- <?php do_action( 'presscore_after_content' ) ?>
- <?php endif // if content visible ?>
- <?php get_footer() ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement