0

我将一些页面呈现到这样的内容滑块:

function tonal_get_slide($postID) {
    $page_data = get_page( $postID );
    $title = $page_data->post_title;
    $content = "<h2>" . $title . "</h2>";
    $content .= apply_filters('the_content', $page_data->post_content);
    return $content;
}

我所有自己创建的简码都像魅力一样工作,但是画廊简码被忽略了(它什么都不返回,不是简码,没有空<p>,什么都没有......)

任何帮助将不胜感激,谢谢

4

1 回答 1

0

明白了...仅适用于$post变量:

$post    = get_page( $postID );
$content = apply_filters('the_content', $post->post_content);
于 2012-03-02T15:22:21.397 回答