Magento2 Fishpig如何获取返回的ACF图像网址

时间:2018-07-04 08:22:04

标签: magento2 advanced-custom-fields fishpig

我是magento2的新手。现在,我通过使用Fishpig在magento2站点内执行wp post。我的wp中安装了ACF,我想称呼它。

My code

我尝试控制台记录我的滑块ACF,因为它通过使用fishpig文档中声明的$ post-> getMetaValue(“ slider”)在帖子中的转发器字段中得到4张图像,所以返回4。

My ACF fields

接下来,我想循环出转发器ACF字段并显示图像。图片字段已设置为返回URL。

我该怎么做?使用什么方法?请给我看示例代码。非常感谢。

1 个答案:

答案 0 :(得分:0)

如果滑块返回4,则表示ACF无法正常工作。确保您具有Magento中最新版本的ACF模块和免费的Magento WordPress集成模块。