ID."&post_type=attachment&post_mime_type=image&orderby=menu_order&order=ASC"); if($files){ $keys = array_keys($files); if (get_post_meta($page->ID, 'alb_cover', 'TRUE')) {$i = get_post_meta($page->ID, 'alb_cover', 'TRUE')-1;} else {$i = 0;} $thumb=wp_get_attachment_thumb_url($keys[$i]); } $album .= ' '; // */ } return $album; } function albumize_css() { if ( !defined('WP_CONTENT_URL') ) define( 'WP_CONTENT_URL', get_option('siteurl') . '/wp-content'); echo " "; } add_shortcode('albumize', 'albumize_func'); add_action('wp_head', 'albumize_css'); ?>