2
我有WordPress内容和图片库的WordPress页面。当我的print_r我的内容,它显示了如下面如何从wordpress中的图库简码获取图库图像?
stdClass Object
(
[ID] => 4558
[post_author] => 1
[post_date] => 2011-09-22 05:34:44
[post_date_gmt] => 2011-09-22 05:34:44
[post_content] =>
Nayer has pursued her passion for art since childhood.
She believes that art should have a positive influence in the world and on our life experiences.
She studied in Persia at Tehran University and at California State University, Los Angeles.
[gallery link="file" columns="2"]
[post_title] => About the Water Artist
[post_excerpt] =>
[post_status] => publish
[comment_status] => open
[ping_status] => open
[post_password] =>
[post_name] => about-the-water-artist
[to_ping] =>
[pinged] =>
[post_modified] => 2011-11-22 04:59:58
[post_modified_gmt] => 2011-11-22 04:59:58
[post_content_filtered] =>
[post_parent] => 0
[guid] => http://nagu.wordpress.net/?page_id=4558
[menu_order] => 0
[post_type] => page
[post_mime_type] =>
[comment_count] => 0
[ancestors] => Array
(
)
[filter] => raw
)
从以上响应中[POST_CONTENT]我发现画廊简码[画廊链接=“文件”列=“2”]。图像不显示。
是否有任何可能使用该短代码从发布内容中提取图像url?
我也有兴趣找到答案 –
@Jordan Rynard我在下面发布了答案。它对我来说工作得很好。 –