使用{{post.attribute}}语法在产品循环中打印产品属性

我正在尝试在WooCommerce产品循环中打印产品属性。

我目前正以这种方式进行操作:

{{post.terms('pa_producer-name')|join(',')}}

但是我想知道是否有一种方法可以扩展PostQuery类,以便可以将其用作

{{post.producer}}

谢谢!

wangruiyue 回答:使用{{post.attribute}}语法在产品循环中打印产品属性

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3001845.html

大家都在问