当我尝试使用以下方式之一嵌入YouTube视频时:
通过输入YouTube URL[embed]
通过媒体浏览器添加视频,对其进行快捷编码(这会导致[embed]
shortcode)我在编辑器视图中看到的视频很好:

但在前端视图中,使用以下代码:
$content_desktop = do_shortcode(get_the_content());
我看到了
输入纯URL时:未解析的URL
输入[embed]
短代码或使用所见即所得编辑器:实际上什么都没有
我检查过的东西:
我是管理员用户,因此权限应该没有问题,其他短代码也可以正常工作,DOM会显示我上面显示的内容,没有CSS干扰,我正在尝试嵌入的YouTube视频允许外部嵌入,我没有选择签入“设置”>“媒体”(显然,过去必须在那里显式打开媒体嵌入,但没有更多)