douqi3913 2015-09-28 08:02
浏览 271

Woocommerce - 为产品添加精选视频

I am working on a wordpress plugin based on woocommerce and as a part of it I would ask site users to post products from front end form. I am saving the submitted data as post_type=product so that I can enable users to create their own products based on woocommerce in which I have succeeded.

Now I want to allow users to upload a video for their product from the same front end form and I need to attach the video to the product. Finally the video should be displayed in the place of featured image in single-product page.

What I noticed is woocommerce is allowing only image filetypes by default but I also want to add filetypes like mp4 and display it instead of product image. Can anyone help understanding the way to do it?

  • 写回答

1条回答 默认 最新

  • douyun8885 2015-09-28 08:14
    关注

    I think doing it using a custom filed will be easy for you because you are using a front end form for this. You can use update_post_meta function easily.

    You can use ACF or any other plugin to make custom fields easily.

    评论

报告相同问题?

悬赏问题

  • ¥15 opencv图像处理,需要四个处理结果图
  • ¥15 无线移动边缘计算系统中的系统模型
  • ¥15 深度学习中的画图问题
  • ¥15 java报错:使用mybatis plus查询一个只返回一条数据的sql,却报错返回了1000多条
  • ¥15 Python报错怎么解决
  • ¥15 simulink如何调用DLL文件
  • ¥15 关于用pyqt6的项目开发该怎么把前段后端和业务层分离
  • ¥30 线性代数的问题,我真的忘了线代的知识了
  • ¥15 有谁能够把华为matebook e 高通骁龙850刷成安卓系统,或者安装安卓系统
  • ¥188 需要修改一个工具,懂得汇编的人来。