Type Field: File – Outputs raw url only?
-
I’m using a file field and no matter what I try, it only outputs the raw URL;
types_render_field("downloads", array("title" => "read me..."))
This outputs nothing
echo do_shortcode('[types field="downloads"][/types]');
This outputs a raw, unseparated string of URLs, not links as the API says it will
echo do_shortcode('[types field="downloads" title="read me..."][/types]');
This outputs a raw, unseparated string of URLs. Title argument is ignored.
echo do_shortcode('[types field="downloads" ouput="raw"][/types]');
This outputs a raw, unseparated string of URLs, same as the top two.
As you can see, none of these output links! All I’m getting are raw strings of URLs no matter what I try. This isn’t a problem with image fields, only the file field.
I have tried ‘output’=>’html’ argument and it wraps each raw string in a div>span. Again no link, I don’t want to have to resort to separators unless I really have to as this won’t let me have the file name as the link text. (Obviously I wouldn’t want the full URL as the link text).
Any help is greatly appreciated.
Thanks.
Kyle
- The topic ‘Type Field: File – Outputs raw url only?’ is closed to new replies.