0
我想結合簡單的燈箱插件與wp_trim_words功能。內容需求存在問題,因此我無法在主頁上找到相冊。我得到這個代碼簡單的燈箱插件與wp_trim_words
$content = get_the_content();
apply_filters('the_content', $content);
$content = str_replace(']]>', ']]>', $content);
$trimmed_content = do_shortcode(wp_trim_words($content, 50, '<a href="' . get_permalink() . '" style="display: block; width: 100%;">...more</a>'));
echo $trimmed_content;
它顯示[gallery = 1,2,3]的圖像,但簡單的燈箱插件沒有初始化。這裏有什麼問題?