如何获取图像的描述?
$album_id = get_the_id();
$photos = $wpdb->get_results(
"select * from wp_postmeta where post_id = \'"
. $album_id
. "\' AND meta_key = \'gallery_ph\' order by meta_id desc"
);
这是SQL查询的结果:Array ( [0] => stdClass Object ( [meta_id] => 887 [post_id] => 604 [meta_key] => gallery_ph [meta_value] => http://xxx/wp-content/uploads/2013/03/foto_03_copy200.jpg ) )