Multiple Select with wp_dropdown_categories wordpress

别来无恙 提交于 2019-12-11 11:40:25

问题


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.


回答1:


You can check:

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.



来源:https://stackoverflow.com/questions/13246781/multiple-select-with-wp-dropdown-categories-wordpress

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!