嗨,我正在按照this article 我无法让它工作,它给了我一个空白屏幕。
我认为在div“view-view-first”和div“mask”之间打开和关闭php标记有问题。当我删除这些标记时,我会再次显示站点,但显示的不是图像,而是php代码。
我确实让代码简单地工作了一下,但现在它又坏了。
谢谢你的帮助。
RT公司
<?php get_header(); ?>
<div >
<?php query_posts(array(\'category__in\' => array(5), \'posts_per_page\' => 10000)); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php $currentid = get_the_id(); ?>
<div class="grid-box grid-block mod-box width33">
<div class="view view-first">
<?php
if ( get_the_post_thumbnail($post_id) != \'\' ) {
echo \'<a href="\'; the_permalink(); echo \'" class="thumbnail-wrapper">\';
the_post_thumbnail(array(300,600));
echo \'</a>\';
} else {
echo \'<a href="\'; the_permalink(); echo \'" class="thumbnail-wrapper">\';
echo \'<img src="\';
echo catch_that_image(array(300,600));
echo \'" alt="" />\';
echo \'</a>\';
}
wp_reset_query();
?>
<div class="mask">
<h2><a href="<?php the_permalink(); ?>"><?php echo get_the_title($currentid); ?></a></h2>
<p><?php echo get_the_excerpt( $post->parent ); ?></p>
<a href="<?php the_permalink(); ?>" class="info">Read More...</a>
</div>
</div>
</div>
<?php
endwhile;
endif;
wp_reset_query();
?>
<div class="clearfix">
</div>
<?php get_footer(); ?>