我只需要找到带有标签的帖子forest gump
. 我尝试过:new WP_Query(\'tag=forest+gump\');
, new WP_Query(\'tag=forest gump\');
. 然而,他们都会返回所有的帖子,而不仅仅是带有forest gump
标签但是,单个标记(没有空格)可以正常工作。替代方案(如普通SQL)也可以使用。
入口标记行为forest gump, forrest gump, questend
.
我只需要找到带有标签的帖子forest gump
. 我尝试过:new WP_Query(\'tag=forest+gump\');
, new WP_Query(\'tag=forest gump\');
. 然而,他们都会返回所有的帖子,而不仅仅是带有forest gump
标签但是,单个标记(没有空格)可以正常工作。替代方案(如普通SQL)也可以使用。
入口标记行为forest gump, forrest gump, questend
.
new WP_Query(array(\'tag_slug__in\' => array(\'forrest-gump\', \'forest-gump\', \'questend\')));
new WP_Query(\'tag=forrest+gump,forest+gump,questend\');
应该也可以。。。我想在一个小部件中显示帖子的标签。我知道这很难,因为这是在循环之外,但已经完成了吗,有没有可用的?