Insert a heart icon into header - by roswell-it

This topic has 2 replies, 2 voices, and was last updated 6 years, 11 months ago ago by Rizath

  • Avatar: roswell-it
    roswell-it
    Participant
    May 17, 2017 at 15:49

    Hi Team,

    I am trying to insert a heart icon into the header of of the theme

    I added the following code to insert a shortcode into the header.php file

    <?php echo do_shotcode(‘[wp-svg-icons icon=”heart” wrap=”i”]’); ?>

    but this returns nothing. A point in the right direction would be most appreciated.

    1 Answer
    Avatar: rizath
    Rizath
    Member
    May 18, 2017 at 09:53

    In header where you want to add the icon?
    Can you show a screenshot of the area you are mentioning?

    Generaly you can use ::before selector to add something before class or element.

    eg: if you want to add the an envelop icon before the my account you can use following css:

    .my-account-link::before {
        content: "\f003";
        position: relative;
        left: -12px;
        font-family: FontAwesome;
    }

    you have to adjust this as you want and add the code in Theme Options >> Custom CSS >> global custom css

    for further details you can refer this : https://www.w3schools.com/cssref/sel_before.asp

  • Viewing 2 results - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.