Forum Replies Created

Viewing 1 replies (of 1 total)
  • Hello,

    Having a problem calling the featured image from the plugin “Dynamic Featured Image”

    I would like to be able to show featured image 2 and featured image 3 in the posts (
    How do I get the code correct so I can show featured image 2 and 3?

    Current code of single.php

    <?php if (!defined(‘ABSPATH’)) die(‘No direct access allowed’); ?>
    <?php get_header(); ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    <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(‘[tmm_audio]’ . $post_type_values[$post_pod_type] . ‘[/tmm_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(‘[tmm_video type=”youtube” width=”‘ . $video_width . ‘” height=”‘ . $video_height . ‘”]’ . $source_url . ‘[/tmm_video]’);
    break;
    case $allows_array[1]:
    echo do_shortcode(‘[tmm_video type=”vimeo” width=”‘ . $video_width . ‘” height=”‘ . $video_height . ‘”]’ . $source_url . ‘[/tmm_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”>

    </div><!–/ .image-post-slider–>

    <?php endif; ?>
    <?php
    break;

    default:
    ?>
    <?php if (has_post_thumbnail()) : ?>

    <div class=”entry-thumb”>
    <div class=”preloader”>ID, ”); ?>”><img src=”<?php echo TMM_Helper::get_post_featured_image($post->ID, ‘700*300’); ?>” alt=”<?php the_title(); ?>” /></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”>/<?php echo get_the_date(‘Y/m’) ?>”><?php echo get_the_date() ?></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”>#comments”><?php echo get_comments_number(); ?> <?php _e(‘Comments’, TMM_THEME_FOLDER_NAME); ?></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->user_email, 60);
    echo $avatar_url;
    ?>
    </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;
    ?>

Viewing 1 replies (of 1 total)