Не могу вывести фото из поста на главную
Ключ вывода фото в файлах разный
Пробовал все три – фото на главной нет.
Подскажите как решить проблему
—————————————————————————————————————-
в home
<div class="sepia">
<?php
if ( has_post_thumbnail() ) { ?>
<?php
$imgsrcparam = array(
‘alt’ => trim(strip_tags( $post->post_excerpt )),
‘title’ => trim(strip_tags( $post->post_title )),
);
$thumbID = get_the_post_thumbnail( $post->ID, ‘two‘, $imgsrcparam ); ?>
<div class="preview"><a href="<?php the_permalink() ?>"><?php echo "$thumbID"; ?></a></div>
<?php } else {?>
<div class="preview"><a href="<?php the_permalink() ?>"><img src="<?php bloginfo(‘template_url’); ?>/images/default-thumbnail.jpg" alt="<?php the_title(); ?>" /></a></div>
<?php } ?>
</div><!– .sepia –>
<div class="sepia">
<?php
if ( has_post_thumbnail() ) { ?>
<?php
$imgsrcparam = array(
‘alt’ => trim(strip_tags( $post->post_excerpt )),
‘title’ => trim(strip_tags( $post->post_title )),
);
$thumbID = get_the_post_thumbnail( $post->ID, ‘one‘, $imgsrcparam ); ?>
<div class="preview"><a href="<?php the_permalink() ?>"><?php echo "$thumbID"; ?></a></div>
<?php } else {?>
<div class="preview"><a href="<?php the_permalink() ?>"><img src="<?php bloginfo(‘template_url’); ?>/images/default-thumbnail.jpg" alt="<?php the_title(); ?>" /></a></div>
<?php } ?>
</div><!– .sepia –>
——————————————————————————————————————————————————-
в page
<?php
if ( has_post_thumbnail() ) { ?>
<?php
$imgsrcparam = array(
‘alt’ => trim(strip_tags( $post->post_excerpt )),
‘title’ => trim(strip_tags( $post->post_title )),
);
$thumbID = get_the_post_thumbnail( $post->ID, ‘big‘, $imgsrcparam ); ?>
<div class="sepia">
<div class="preview"><a href="<?php the_permalink() ?>"><?php echo "$thumbID"; ?></a></div>
</div><!– .sepia –>
—————————————————————————————————————————————————-
в index
<div class="sepia">
<?php
if ( has_post_thumbnail() ) { ?>
<?php
$imgsrcparam = array(
‘alt’ => trim(strip_tags( $post->post_excerpt )),
‘title’ => trim(strip_tags( $post->post_title )),
);
$thumbID = get_the_post_thumbnail( $post->ID, ‘one‘, $imgsrcparam ); ?>
<div class="preview"><a href="<?php the_permalink() ?>"><?php echo "$thumbID"; ?></a></div>
<?php } else {?>
<div class="preview"><a href="<?php the_permalink() ?>"><img src="<?php bloginfo(‘template_url’); ?>/images/default-thumbnail.jpg" alt="<?php the_title(); ?>" /></a></div>
<?php } ?>
</div><!– .sepia –>