WP – Image.php mostrar galeria en post de imagen

WP – Image.php mostrar galeria en post de imagen


Warning: Use of undefined constant user_level - assumed 'user_level' (this will throw an Error in a future version of PHP) in /nfs/c01/h06/mnt/3243/domains/brainsoup.cl/html/wp-content/plugins/ultimate-google-analytics/ultimate_ga.php on line 524

$post_parent = get_post($post->ID, ARRAY_A);
$parent = $post_parent[‘post_parent’];

$attachments = get_children(“post_parent=$parent&post_type=attachment&post_mime_type=image&orderby=menu_order ASC, ID ASC”);
foreach($attachments as $id => $attachment) :
echo wp_get_attachment_link($id, ‘thumbnail’, true);
endforeach;
?>