SVG Upload in Repeater
Hi there,
I’ve added a new widget which will show a slider. For the slides I am using the repeater function, so every slide can be styled differntly.
I now want to upload svgs to every slide and show them to the frontend. So I’ve added the lines to the function to allow svg upload, but I just don’t know how to display the icon now?
I’ve tried:
$svgimageid = $repeater[‘icon’];
$svgimage= wp_get_attachment_image_src( $svgimageid );
A line like: <img src="”/> will only display the value “array”.
QUESTION:
– How can I now output the svg? It’s not working like a normal image.
– I’d like to insert the real SVG Code (not as an image element), so like opening the svg in the browser, right click “show sourcecode”. Is this possible?
Thank you!
This is our free support forum. Replies can take several days.
Need fast email support? Get SiteOrigin Premium
Replies
3… can not edit it… sucks…
Hi there,
I’ve added a new widget which will show a slider. For the slides I am using the repeater function, so every slide can be styled differntly.
I now want to upload svgs to every slide and show them to the frontend. So I’ve added the lines to the function to allow svg upload, but I just don’t know how to display the icon now?
I’ve tried:
A line like:
will only display the value “array”.
QUESTION:
– How can I now output the svg? It’s not working like a normal image.
– I’d like to insert the real SVG Code (not as an image element), so like opening the svg in the browser, right click “show sourcecode”. Is this possible?
Thank you!
so that was stupid….
…. “array” should have been enough to recognize….
thank you guys anyway.
BTW: I really dislike that i cannot edit my posts. this thread could be 1 post with question AND answer … Think about it @siteorigin :) (and thank you for your work it’s awesome)
Replies on this thread are closed.
Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.