Home › Forums › Feature Requests › File field type: Option to return SVG as code › Reply To: File field type: Option to return SVG as code
I’ve found an(other) solution with Curl.
<?php $test = get_field('logo'); ?>
<a href="<?php the_field('link'); ?>" target="_blank">
<?php $handle = curl_init();
curl_setopt($handle, CURLOPT_URL, $test);
curl_setopt($handle, CURLOPT_USERAGENT, 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:13.0) Gecko/20100101 Firefox/13.0.1');
curl_exec($handle);
curl_close($handle); ?>
</a>
My SVG files are loads inline now.
Hope this solution could helps someone.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.