Support

Account

Forum Replies Created

  • 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.

  • Hello,
    thanks for your snippets, but none of your solutions work for me.

    <?php $test = get_field('logo', 'option'); ?>
    <a href="<?php the_field('link'); ?>" target="_blank">
    <?php echo file_get_contents( $test ); ?>
    </a>

    I’ve tested image field with object array or URL but nothing appears in my a link-tag.
    The fields are correct, because everything works fine for a (simple) display of img logos (example below).

    <?php $test = get_field('logo'); ?>
    <a href="<?php the_field('link'); ?>" target="_blank">
    <img src="<?php echo $test['url']; ?>" alt="<?php echo $test['alt']; ?>" />
    </a>

    But I want to use inline SVGs to animate the hovers in css.
    Would someone be able to help me please?
    I have been looking for solutions for several days.
    Thank you.

Viewing 2 posts - 1 through 2 (of 2 total)