【发布时间】:2011-08-31 17:37:49
【问题描述】:
我有一个 WordPress 自定义帖子类型设置。我已经创建了
single-[customposttype].php
但是,它不是只显示请求的自定义帖子类型,而是转到 URL,然后显示自定义类型中的所有帖子。
这是我目前正在使用的代码的副本:
<?php query_posts("post_type=shorts"); while (have_posts()) : the_post(); ?>
<div class="header-promo">
<?php echo get_post_meta($post->ID, "mo_short_embed", true); ?>
</div>
<div class="content-details">
<h1><?php the_title(); ?></h1>
<?php the_content(); ?>
</div>
<?php endwhile; ?>
提前致谢:)
【问题讨论】:
-
这样的问题非常适合wordpress.stackexchange.com
-
谢谢安迪,我也把这个问题发到那里了 (bit.ly/c0q3WR)
标签: wordpress wordpress-theming custom-post-type