diff --git a/insert-pages.php b/insert-pages.php index 946591e..4d93fc0 100644 --- a/insert-pages.php +++ b/insert-pages.php @@ -377,7 +377,7 @@ function insertPages_handleShortcode_insert( $atts, $content = null ) { if ( is_protected_meta( $keyt, 'post' ) ) { continue; } - $value = get_post_custom_values( $key ); + $value = get_post_custom_values( $key, $inserted_page->ID ); if ( is_array( $value ) ) { $values = array_map( 'trim', $value ); $value = implode( $values, ', ' );