我不确定我在这里做错了什么。我有一个名为“grid\\u缩略图”的字段和一个“related\\u projects”post\\u对象。我能够显示相关帖子的标题。我只是不知道如何获取相关帖子的图片URL。建议?
<?php foreach(get_field(\'related_projects\') as $post_object): ?>
<li>
<img src="<?php echo get_field(\'grid_thumbnail\'); ?>"><br />
<a href="<?php echo get_permalink($post_object->ID); ?>"><?php echo get_the_title($post_object->ID) ?></a>
</li>
编辑打印返回:
stdClass Object ( [ID] => 100
[post_author] => 1
[post_date] => 2012-01-12 05:11:25
[post_date_gmt] => 2012-01-12 05:11:25
[post_content] => Nulla facilisi. Pellentesque non tincidunt est. Nulla porta bibendum auctor. Proin feugiat eros bibendum lacus viverra fringilla ac id felis. Praesent a commodo leo. Phasellus et odio eget justo venenatis interdum at ut nulla. Praesent lacinia nulla eu libero tempus pulvinar. Sed elementum, nulla vitae imperdiet ornare, elit lorem vestibulum erat, ac aliquet purus lacus pharetra risus. Mauris facilisis volutpat odio a ultrices. Etiam nisl urna, mattis sed ultricies sit amet, euismod sit amet eros. Nam tempus erat ut ligula elementum cursus faucibus elit accumsan. Fusce rhoncus, nunc nec vestibulum facilisis, nibh leo vestibulum metus, vitae malesuada leo dui eu erat. Proin scelerisque, mi viverra dignissim porta, lectus justo pellentesque metus, at consequat ligula nulla eu ante. Fusce fringilla pretium venenatis. Quisque quis arcu porta dolor condimentum viverra at id augue. Donec pharetra venenatis felis.
[post_title] => Rada
[post_excerpt] =>
[post_status] => publish
[comment_status] => open
[ping_status] => open
[post_password] =>
[post_name] => rada-2
[to_ping] =>
[pinged] =>
[post_modified] => 2012-01-16 23:01:37
[post_modified_gmt] => 2012-01-16 23:01:37
[post_content_filtered] =>
[post_parent] => 0
[guid] => http://estevancarlos.kodingen.com/ecv7/?post_type=projects&p=100
[menu_order] => 0
[post_type] => projects
[post_mime_type] =>
[comment_count] => 0
[ancestors] => Array ( ) [filter] => raw )