【发布时间】:2013-08-05 20:26:39
【问题描述】:
您好,如果从我的分类中转发了特定的“slugs”,我正在尝试打开一个特定的 single.php。
我是和作者一起做的:
<?php $post = $wp_query->post;
if(get_the_author_meta('user_nicename', $post->post_author) == 'name') {
/* Do your author-specific work */
include(TEMPLATEPATH . '/single-coupon-1.php');
} else {
include(TEMPLATEPATH . '/single-coupon-2.php');
}
?>
但我的分类需要这个
我的分类是
<?php echo appthemes_get_custom_taxonomy($post->ID, APP_TAX_STORE, 'slug'); ?>
现在如果 slug 是(只是一个例子)“amazon”,那么应该使用 single-coupon-2.php。
我尝试了很多,但总是出错!而现在我迷失在困惑中;-)...
感谢您的帮助!
【问题讨论】:
-
还是输了几乎什么都试了,没有人有想法