【发布时间】:2013-12-03 08:15:52
【问题描述】:
我有这样的自定义帖子类型
add_action( 'init', 'create_post_type_feedback' );
function create_post_type_feedback() {
register_post_type( 'testimonial',
array(
'labels' => array(
'name' => __( 'Feedbacks' ),
'singular_name' => __( 'Feedback' )
),
'supports' => array('title','editor','thumbnail','custom-fields'),
'public' => true,
'has_archive' => true,
)
);
}
在一个页面中,我显示了推荐列表并使用函数 get_permalink() 获取超链接。要显示推荐帖子的详细信息,我有“single-testimonial.php”,但每当我点击查看推荐的详细信息时,它会将我重定向到“..../testimonial/postname”之类的链接。虽然有单证。 php ,它显示了 404.php 的内容。
如何显示自定义帖子类型的帖子的详细信息?
【问题讨论】: