• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Add icon to external links

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Add icon to external links

This topic is: not resolved

Tagged: external links

  • This topic has 3 replies, 3 voices, and was last updated 2 years, 11 months ago by andytc.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • September 9, 2019 at 3:57 am #493466
    kamalhasa
    Participant

    Hello,

    I wanted to know if there is a way to add an icon to external links (like in Wikipedia) on my posts without using a plugin.

    regards
    Kamal

    September 9, 2019 at 6:02 am #493467
    Victor Font
    Moderator

    You would use the link's before pseudo element. https://css-tricks.com/almanac/properties/c/content/


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    September 10, 2019 at 2:47 am #493480
    kamalhasa
    Participant

    Thank you very much for your reply.

    I am not technically sound and I tried searching about the before pseudo element. It was all tough for me to understand it.

    I would have happily used the plugin which can do the job. But it conflicted with AMP plugin. As a matter of fact the official amp plugin has conflicts with genesis plugins as well. I have removed many plugins due to this reason.

    I even skipped using a plugin which opens all external links in new tab and instead I edited them manually (still doing it).

    regards
    Kamal

    September 10, 2019 at 6:26 am #493485
    andytc
    Participant

    If you can use FontAwesome (older version) you could try this code to add an icon to all external links - Edit and adjust as required -

    /* Change "my-domain-name.com" to your domain name without the www */
    /* Change the content icon \f08e to an icon of your choice - Fontawesome older version */
    
    .entry-content [href^="https"]:not([href*="my-domain-name.com"]):before {
     content: "\f08e";
     font-family: FontAwesome;
     font-size: 16px;
     font-style: normal;
     font-weight: normal;
     padding-right: 8px;
     padding-left: 4px;
    }

    https://fontawesome.com/v4.7.0/

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2022 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble