【发布时间】:2014-03-28 01:25:20
【问题描述】:
我正在尝试将简单的灯箱插件与 wp_trim_words 函数结合起来。 the_content 要求存在问题,因此我无法让主页上的画廊正常工作。我得到了这个代码
$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] 的图像,但简单的灯箱插件未初始化。这里有什么问题?
【问题讨论】:
标签: wordpress