1

此页面的代码片段是:

<h2><?php _e('Posts by Tags'); ?></h2>
<form action="<?php bloginfo('url'); ?>/" method="get">
<div>
<?php
$select = wp_dropdown_categories('taxonomy=post_tag&show_option_none=Select tag&show_count=1&orderby=name&echo=0');
$select = preg_replace("#<select([^>]*)>#", "<select$1 onchange='return this.form.submit()'>", $select);
echo $select;
?>
<noscript><div><input type="submit" value="View" /></div></noscript>
</div></form>

当我尝试实现它并从下拉列表中选择一个选项时,它会转到一个页面网址,其格式为:

http://sitename.com/?cat=5

然后显示 404 错误。

所以我的问题是:

我如何才能选择链接到具有关联标签而不是类别的帖子的选项?

谢谢你。

更新:

我的解决方案是安装 wordpress分类下拉小部件

4

0 回答 0