【发布时间】:2016-07-25 16:29:35
【问题描述】:
这道难点:
我正在尝试使用 custom taxonomy 'specialismen' 的 custom post type 'specialisaties' 中的所有帖子,并且需要加载当前加载的 '来自 URL 的术语'。
目前我有这段代码输出术语 'superpower' 。
<?php $loop = new WP_Query(array('post_type'=>'specialisaties', 'taxonomy'=>'specialismen', 'term' => 'superpower', 'orderby' => 'menu_order', 'order' => 'asc')); ?>
<?php while ($loop->have_posts()) : $loop->the_post(); ?>
<h1><?php the_title() ?></h1>
<?php the_content() ?>
<?php endwhile; ?>
这会加载带有“超级大国”一词的特定帖子。如何从我正在加载的 URL 中动态获取“术语”?
提前致谢,
【问题讨论】: