• Resolved Sevar

    (@sevar)


    Hi! I’m trying to display Entypo font icons within the featured area where is the text supposed to be. I couldn’t find how to do that, some suggested smtng like that <i class="entypo-phone">📞</i> but it doesn’t work either. Instead of the needed image there appeared a little square. I know, you’ll think my head is a little square but I want them there. Sorry for my English I’m not pretty much an englishman but I’m trying. Please help!

Viewing 15 replies - 1 through 15 (of 17 total)
  • Thread Starter Sevar

    (@sevar)

    Maybe it sounded rude but I didn’t mean, really…

    Assuming you want to add the icon before an element identified by the some specific CSS selector, (let’s just use #css-selector, for exemplification), add this to Dashboard > Appearance > Customize > custom CSS or in your child theme’s style.css:

    #css-selector:before {
    	content: "\1F4DE";
    	display: inline-block;
    	font-family: 'entypo';
    	speak: none;
    	font-weight: normal;
    	font-variant: normal;
    	text-transform: none;
    	line-height: 1;
    	-webkit-font-smoothing: antialiased;
    }

    From DOM’s point of view, #css-selector:before is a child of #css-selector, hence you could use any CSS declarations to further customize it, the most common being: padding, margin, font-size, top, color and opacity. In order to change the icon with another, just use the U+hexcode from entypo charmap, but replace U+ with a backslash (\).

    On the other hand, if you only want to display entypo icons inline, declare a custom class (let’s call it .entypo-class) in your CSS:

    .entypo-class {
    	display: inline-block;
    	font-family: 'entypo';
    	speak: none;
    	font-weight: normal;
    	font-variant: normal;
    	text-transform: none;
    	line-height: 1;
    	-webkit-font-smoothing: antialiased;
    	font-size: xx-large;
    }

    and add your entypo code in your html like this

    <span class="entypo-class">&#128222 ;</span>

    Please note that I couldn’t use the correct html entity in the span, as WP forum automatically changes it into the actual html entity, so you need to remove the space between the code and the finishing semi-colon (;). Also please note that this time you need to use the HTML entity code of the icon. I used the telephone as you mentioned it above. Again, you’re free to add CSS declarations to further customize the look and feel of your icons, but try to leave the ones declared above unchanged. They are a reset of the font, making sure it will render properly in most situations, regardless of the text properties of the context.

    Thread Starter Sevar

    (@sevar)

    Thanks for your thorough explanation! But you know, it only seems to work with Internet Explorer. In Chrome in Opera it doesn’t.

    Bonjour,
    j’utilise le thème red et je n’arrive pas a en changer la couleur.
    le # reste en gris?
    vous avez une idée!
    merci

    Thread Starter Sevar

    (@sevar)

    Fontawesome doesn’t work at all… On my other site it works… checked every path…

    Thread Starter Sevar

    (@sevar)

    I don’t know French either…

    Sorry
    Hello,
    I use the red theme and I can not seem to change the color.
    # the rest gray? in widget / footer
    you have an idea!
    my site
    thank you

    Thread Starter Sevar

    (@sevar)

    Color of the font?

    color of #

    Thread Starter Sevar

    (@sevar)

    I see but now I have no idea…I myself trying in vain to use some of these fonts

    ok thank you, I’ll wait

    Thread Starter Sevar

    (@sevar)

    I think the – # – has been taken not from Entypo but from Genericons, the other font in use within the theme or vice versa…

    @sevar: It works for me in both Chrome and Firefox. You might have missed a detail. Link please?

    @jean-claude Martin: please open your own thread for your problem.

    Thread Starter Sevar

    (@sevar)

    https://xn--h1aaaidk2eua0a.xn--p1ai/ I don’t understand…reloaded the page once again and now it works…probably it’s because my CDN…

    Thread Starter Sevar

    (@sevar)

    I forgot there is no CDN on this site and w3 total cache is disabled…mystery

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Trying to display Entypo font icons’ is closed to new replies.