if ($_GET['id'] > 0)
{
$page_data = get_post($_GET[‘id’]); // You must pass in a variable to the get_page function. If you pass in a value (e.g. get_page ( 123 ); ), WordPress will generate an error.
//$content = apply_filters(‘the_content’, $page_data->post_content); // Get Content and retain WordPress filters such as paragraph tags. Origin from: http://wordpress.org/support/topic/get_pagepost-and-no-paragraphs-problem
$content = apply_filters(‘the_content’, $page_data->post_content);
//echo ‘‘;
$title = apply_filters(‘the_title’, $page_data->post_title); // Get title
// Output Content
$args = array(
‘post_type’ => ‘attachment’,
‘numberposts’ => -1,
‘post_status’ => null,
‘post_parent’ => $_GET[‘id’],
‘orderby’ => ‘menu_order’,
‘order’ => ‘asc’,
);
$attachments = get_posts($args);
?>
Got Something To Say!
Трябва да влезете, за да публикувате коментар.