Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php if (!defined('ABSPATH')) die('No direct access allowed'); ?>
- <?php get_header(); ?>
- <?php if (have_posts()) : while (have_posts()) : the_post();
- // <!--/ START // DYNAMIC FEATURED IMAGE AWESOME PLUGIN -->
- if( function_exists('dfi_get_featured_images') ) {
- $featuredImages = dfi_get_featured_images();
- var_dump( $featuredImages );
- //Now, loop through the image to display
- }
- endwhile;
- ?>
- <article id="post-<?php the_ID(); ?>" <?php post_class("entry clearfix"); ?>>
- <?php
- $post_pod_type = get_post_meta($post->ID, 'post_pod_type', true);
- $post_type_values = get_post_meta($post->ID, 'post_type_values', true);
- //***
- switch ($post_pod_type) {
- case 'audio':
- echo do_shortcode('[audio]' . $post_type_values[$post_pod_type] . '[/audio]');
- break;
- case 'video':
- ?>
- <?php
- $video_width = 700;
- $video_height = 300;
- $source_url = $post_type_values[$post_pod_type];
- if (!empty($source_url)) {
- $video_type = 'youtube.com';
- $allows_array = array('youtube.com', 'vimeo.com');
- foreach ($allows_array as $key => $needle) {
- $count = strpos($source_url, $needle);
- if ($count !== FALSE) {
- $video_type = $allows_array[$key];
- }
- }
- switch ($video_type) {
- case $allows_array[0]:
- echo do_shortcode('[video type="youtube" width="' . $video_width . '" height="' . $video_height . '"]' . $source_url . '[/video]');
- break;
- case $allows_array[1]:
- echo do_shortcode('[video type="vimeo" width="' . $video_width . '" height="' . $video_height . '"]' . $source_url . '[/video]');
- break;
- default:
- break;
- }
- }
- ?>
- <?php
- break;
- case 'quote':
- echo do_shortcode('[blockquote]' . $post_type_values[$post_pod_type] . '[/blockquote]');
- break;
- case 'gallery':
- TMM_OptionsHelper::enqueue_script('cycle');
- $gall = $post_type_values[$post_pod_type];
- ?>
- <?php if (!empty($gall)) : ?>
- <div class="image-post-slider">
- <ul>
- <?php foreach ($gall as $key => $source_url): ?>
- <li><div class="preloader"><a rel="lightbox" href="<?php echo $source_url; ?>" class="bwWrapper single-image plus-icon"><img src="<?php echo TMM_Helper::resize_image($source_url, '700*300') ?>" alt="<?php echo $post->post_title ?>" /></a></div></li>
- <?php endforeach; ?>
- </ul>
- </div><!--/ .image-post-slider-->
- <?php endif; ?>
- <?php
- break;
- default:
- ?>
- <?php if (has_post_thumbnail()) : ?>
- <div class="entry-thumb">
- <div class="preloader"><a class="single-image plus-icon bwWrapper" href="<?php echo TMM_Helper::get_post_featured_image($post->ID, ''); ?>"><img src="<?php echo TMM_Helper::get_post_featured_image($post->ID, '700*300'); ?>" alt="<?php the_title(); ?>" /></a></div>
- </div>
- <?php endif; ?>
- <?php
- break;
- }
- ?>
- <div class="entry-title">
- <h2 class="title"><?php the_title(); ?></h2>
- </div><!--/ .entry-title-->
- <?php if (TMM::get_option("blog_single_show_all_metadata")) : ?>
- <div class="entry-meta">
- <?php if (TMM::get_option("blog_single_show_date")) : ?>
- <span class="date"><a href="<?php echo home_url() ?>/<?php echo get_the_date('Y/m') ?>"><?php echo get_the_date() ?></a></span>
- <?php endif; ?>
- <?php if (TMM::get_option("blog_single_show_author")) : ?>
- <span class="author"><?php _e('By', TMM_THEME_FOLDER_NAME); ?> <?php the_author_link() ?></span>
- <?php endif; ?>
- <?php $tags = get_the_tag_list('', ', '); ?>
- <?php if (TMM::get_option("blog_single_show_tags") AND !empty($tags)) : ?>
- <span class="tag"><?php echo $tags ?></span>
- <?php endif; ?>
- <?php if (TMM::get_option("blog_single_show_category")) : ?>
- <?php $categories_list = get_the_category_list(__(', ', TMM_THEME_FOLDER_NAME)); ?>
- <?php if (!empty($categories_list)) : ?>
- <span class="categories">
- <?php _e('In', TMM_THEME_FOLDER_NAME); ?>
- <?php echo $categories_list ?>
- </span>
- <?php endif; ?>
- <?php endif; ?>
- <?php if (TMM::get_option("blog_single_show_comments")) : ?>
- <span class="comments"><a href="<?php the_permalink() ?>#comments"><?php echo get_comments_number(); ?> <?php _e('Comments', TMM_THEME_FOLDER_NAME); ?></a></span>
- <?php endif; ?>
- </div><!--/ .entry-meta-->
- <?php endif; ?>
- <div class="entry-body">
- <?php the_content() ?>
- <?php TMM_Ext_LayoutConstructor::draw_front($post->ID); ?>
- <?php if (TMM::get_option("blog_single_show_bio")): ?>
- <?php $user = get_userdata($post->post_author); ?>
- <?php if (is_object($user)): ?>
- <div class="author-about">
- <div class="author-thumb">
- <div class="avatar">
- <?php
- $avatar_url = get_avatar($user->ID, 60);
- $avatar_url = TMM_Helper::is_file_url_exists($avatar_url) ? $avatar_url : TMM_THEME_URI . '/admin/images/gravatar.jpg';
- ?>
- <img src="<?php echo $avatar_url; ?>" alt="">
- </div>
- </div><!--/ .author-thumb-->
- <div class="author-entry">
- <h5><?php _e('About the Author', TMM_THEME_FOLDER_NAME); ?></h5>
- <p><?php echo stripslashes($user->description); ?></p>
- </div><!--/ .author-entry-->
- </div><!--/ .about-author-->
- <?php endif; ?>
- </div><!--/ .entry-body-->
- <?php endif; ?>
- </article><!--/ .entry-->
- <?php if (TMM::get_option("blog_single_show_comments")): ?>
- <?php comments_template(); ?>
- <?php endif; ?>
- <?php
- endwhile;
- endif;
- ?>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement