0
votes

I render some pages to a content slider like this:

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;
}

All my self-created shortcodes work like a charm, but the gallery-shortcode gets ignored (it does return nothing, not the shortcode, no empty <p>, nothing...)

Any help on would be appreciated, Thanks

1

1 Answers

0
votes

got it... only works with the $post variable:

$post    = get_page( $postID );
$content = apply_filters('the_content', $post->post_content);