我正在使用此代码在我的主页上显示帖子。<?php the_title(); ?>
返回空白。
资料来源:idolizeonline.com(NSFW链接)
-- 如果您将鼠标悬停在缩略图上,帖子的标题和摘录应该出现在图像上(摘录是标题不是)。
<?php if(!of_get_option('ttrust_open_project_single')) : ?>
<div class="project small ajx <?php echo $p; ?>" id="project-<?php echo $post->post_name;?>">
<a href="<?php the_permalink() ?>" rel="bookmark" ></a>
<a href="#<?php echo $post->post_name; ?>" ><?php the_post_thumbnail($project_thumb_size, array('class' => 'thumb', 'alt' => ''.get_the_title().'', 'title' => ''.get_the_title().'')); ?></a>
<span class="title">
<div>
<span id="theTitle"><?php the_title(); ?></span>
<span id="theExcerpt"><?php the_excerpt(); ?></span>
</div>
</span>
</div>
<?php else: ?>
<div class="project small <?php echo $p; ?>" id="project-<?php echo $post->post_name;?>">
<a href="<?php the_permalink() ?>" rel="bookmark" ></a>
<a href="<?php the_permalink() ?>" ><?php the_post_thumbnail($project_thumb_size, array('class' => 'thumb', 'alt' => ''.get_the_title().'', 'title' => ''.get_the_title().'')); ?></a>
<span class="title">
<div>
<span id="theTitle"><?php the_title(); ?></span>
<span id="theExcerpt"><?php the_excerpt() ?></span>
</div>
</span>
</div>
<?php endif; ?>