我在WordPress中有一个查询,它将“发布”类别中的帖子拉到了分类“艺术家”中用艺术家的名字标记 - (恰好是这个页面的标题。)它很棒。直到您使用3个字的艺术家姓名/页面标题。所以“圣加布里埃尔”的作品和“土狼清理”没有。这是一个较旧的网站,我在某些方面使用了魔法字段,但我不知道这可能是问题的一部分。
<?php query_posts( array(
'category_name' => 'releases',
'artist' => wp_title("",false),
'showposts' => 0
) )?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
<img alt="release image" src="<?php echo get ('release_info_release_image') ?>">
</div>
<?php endwhile; ?>
<?php else : ?>
<p>there are currently no releases posted for this artist.</p>
<?php endif; ?>
<?php wp_reset_query(); ?>
这是一张图片,显示页面标题和标记的分类法之间没有拼写错误。
San Gabriel的页面上传了帖子。 Coyote Clean Up没有。当我在标题和艺术家的标签中将他们的名字改为“Coyote Clean”时 - IT WORKS ...一个词乐队的作品。两个字带工作。三个字带不会。
我想不出有任何理由会发生这种情况。
有什么想法吗?
好的 - 这是4个字,它正在工作......