Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何获取wordpress工具集类型插件的音频文件_Wordpress - Fatal编程技术网

如何获取wordpress工具集类型插件的音频文件

如何获取wordpress工具集类型插件的音频文件,wordpress,Wordpress,我正在为自定义字段使用工具集类型 我正在尝试获取产品的声场 使用 及 正在获取音频播放器和音频文件URL的文本 我只需要音频播放器 提前感谢您的帮助这将为您提供音频文件URL: $attachment_id = types_render_field('slug-name', array('raw'=>'true')); $fileurl = wp_get_attachment_url($attachment_id); 然后可以将其传递给音频播放器或标准嵌入短代码 types_rende

我正在为自定义字段使用工具集类型
我正在尝试获取产品的声场
使用

正在获取音频播放器和音频文件URL的文本
我只需要音频播放器

提前感谢您的帮助

这将为您提供音频文件URL:

$attachment_id = types_render_field('slug-name', array('raw'=>'true'));
$fileurl = wp_get_attachment_url($attachment_id);
然后可以将其传递给音频播放器或标准嵌入短代码

types_render_field( "slig-name", array() )
$attachment_id = types_render_field('slug-name', array('raw'=>'true'));
$fileurl = wp_get_attachment_url($attachment_id);