0
我需要以某種方式抓取帖子頁面中的嵌入代碼,這樣我可以在歸檔頁面中包含一個小視頻版本。基本上,我不想展示典型的精選圖片和摘錄,而是希望包含視頻的小版本以及摘錄。類似於Youtube搜索結果頁面。 問題是,我相信視頻代碼是在get_the_content();Grab Youtube嵌入WordPress的帖子頁面的代碼
這是filters.php
function ar2_add_embed_container($html) {
return '<div class="entry-embed">' . $html . '</div>';
}
add_filter('embed_oembed_html', 'ar2_add_embed_container');
我如何使用它?任何幫助,將不勝感激。
在[wordpress.se]中搜索'oembed',我很肯定我在那裏看到過相關的代碼。 – brasofilo