Support

Account

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.

    acf and hardcode output

    Hope this is what you were asking for.