Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想获取在后端 wp-admin 媒体中上传的所有视频。如何在我上传到 WordPress 的自定义页面中显示所有视频或音频?
get_children('order=ASC&orderby=menu_order&post_type=attachment&post_parent=' . $post->ID);
这将返回您当前所在帖子所附的附件。