Skip to content

how to add the 'external-link' symbol from feather icons to every external link in a menu? #1380

Answered by bobmitro
3muchfun asked this question in Help
Discussion options

You must be logged in to vote

The easiest way would be to manually add a shortcode for the external link, like this:

[fi=external-link] Your menu item

You can also use the Custom CSS tool to apply the following rule:

a[href^="http://"]:before, 
a[href^="https://"]:before {
  content: "url(path/to/your.svg);"
}

or

a[href^="http://"]:before, 
a[href^="https://"]:before {
  content: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' %3e%3cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'%3e%3c/path%3e%3cpolyline points='15 3 21 3 21 9'%3…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@3muchfun
Comment options

Answer selected by 3muchfun
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants