Home › Forums › Front-end Issues › Append Inline SVG to Menu item › Reply To: Append Inline SVG to Menu item
Sorry, I think misunderstood what you were asking before.
Here’s what the ACF field outputs:
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 150 150"><path style="fill:#fff" d="M3.305 49.574v79.388h143.916V49.708L75.382 80.745 3.305 49.574z"></path><path style="fill:#fff" d="M3.305 21.777v13.846l72.077 31.172 71.839-31.068v-13.95H3.305z"></path></svg>
Here’s the hardcode:
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 150 150"><path style="fill:#fff" d="M3.305 49.574v79.388h143.916V49.708L75.382 80.745 3.305 49.574z"></path><path style="fill:#fff" d="M3.305 21.777v13.846l72.077 31.172 71.839-31.068v-13.95H3.305z"></path></svg>
Look identical to me.
Here’s a screenshot of the output. The top <svg>
tag is the acf field rendering outside the <a>
tag and the bottom is the hardcoded version. Disregard the <img>
tag, I decided to use the SVG plugin till we resolve this.
Hope this is what you were asking for.
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.