使用wp_dropdown_categories wordpress的多项选择 [英] Multiple Select with wp_dropdown_categories wordpress

查看:150
本文介绍了使用wp_dropdown_categories wordpress的多项选择的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想添加一个小部件,显示显示最新帖子的类别列表。但是我发现插件 http://wordpress.org/extend/plugins/category-posts/ 但是此插件一次只显示一个类别。当我打开小部件文件cat-posts.php时,我看到了代码wp_dropdown_list。那么,您能告诉我如何选择多个类别以显示所有具有最新帖子的类别。有可能还是有另一种方式来完成相同的任务。请提出建议。

I want to add a widget that shows a category list with the latest post shown. However i have found the plugin http://wordpress.org/extend/plugins/category-posts/ But this plugin shows only one category at a time. When i open the widget file cat-posts.php I saw the code wp_dropdown_list . So can you tell me how can make this to select multiple categories to show all categories with latest post. Is it possible or there is another way to do the same task. Please suggest.

任何帮助将不胜感激。提前致谢。

Any help will be greatly appreciated. Thanks in advance.

推荐答案

您可以检查:

wp_category_checklist()

http://codex.wordpress.org/Function_Reference/wp_category_checklist

您可以定义自定义助行器并进行更改复选框以选择多个下拉菜单。

You can define a custom walker and change the check-boxes to drop-down with multiple select.

这篇关于使用wp_dropdown_categories wordpress的多项选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆