【发布时间】:2014-01-19 08:55:57
【问题描述】:
我希望仅将Pinbin 主题用于我的 Wordpress 博客。我已经为其他所有内容创建了一个自定义主题,但对于博客,我想使用这个主题。
我从这个模板中获取了主索引 php 文件,以及页眉和页脚文件。我重命名了页眉和页脚文件,并将页眉/页脚调用更改为这些文件,而不是网站其余部分使用的文件。
我将主题分配给了一个页面,但它没有显示任何帖子。代码如下:
<?php if (have_posts()) : ?>
<div id="post-area">
<?php while (have_posts()) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if ( has_post_thumbnail() ) { ?>
<div class="pinbin-image"><a href="<?php the_permalink() ?>"><?php the_post_thumbnail( 'summary-image' ); ?></a></div>
<div class="pinbin-category"><p><?php the_category(', ') ?></p></div>
<?php } ?>
<div class="pinbin-copy"><h2><a class="front-link" href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
<p class="pinbin-date"><?php the_time(get_option('date_format')); ?> </p>
<?php the_excerpt(); ?>
<p class="pinbin-link"><a href="<?php the_permalink() ?>">→</a></p>
</div>
</div>
<?php endwhile; ?>
关于为什么我什么都没看到有什么想法吗?
谢谢,S
【问题讨论】:
标签: wordpress wordpress-theming