Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #632399

    Hi,

    I know this post of the documentation and I added this to the functions.php:

    add_filter( 'avf_google_heading_font', 'avia_add_heading_font');
    function avia_add_heading_font($fonts)
    {
    $fonts['Cinzel'] = 'Cinzel:400,700,900';
    return $fonts;
    }
    add_filter( 'avf_google_content_font', 'avia_add_content_font');
    function avia_add_content_font($fonts)
    {
    $fonts['Cinzel'] = 'Cinzel:400,700,900';
    return $fonts;
    }

    However:
    I need the Google font Cinzel only for some elements, not for the content font and not for headline font, but in my case for quotes.

    But with this snippet added to the functions.php, Cinzel font is added to the theme options, okay, but when I try to use this font in specific CSS, then nothing happens:

    #zitat-zweispaltig p {
        font-family: "Cinzel" !important;
        line-height: 30px;
        margin: 0 !important;
    }

    I’m not sure, but do I need to include the Google font for other things than the content or headline font in any other way?
    Or what is the right way, to embed and use a Google font in the right way, which is ONLY USED for specific elements/CSS, but NOT for the content/headlines?

    Thanks.

    #632762

    Hi Chris,

    Could you provide us with a link to the site in question so that we can take a closer look please?

    Regards,
    Rikard

    #632872

    Hi Rikard,

    I just need a code snippet please, where and what I need to add, so that I can use a specific Google font just on specific elements, like quotes or something else. With the snippet mentioned in the documentation I can only have a Google font globally for the content or for headlines. But I would like to use ENFOLDs standard settings concerning the fonts, but only need to assign another Google font to some other text components.

    #633661

    Hi,

    Please post us your login credentials (in the “private data” field), so we can take a look at your backend.

    Login credentials include:

    • the URL to the login screen
    • a valid username (with full administration capabilities)
    • as well as a password for that username

    Best regards,
    Andy

    #633789

    Hi Rikard,

    I know how to change the font of specific CSS/text elements. I added now this

    <link href='https://fonts.googleapis.com/css?family=Cinzel' rel='stylesheet' type='text/css'>

    to the header.php and changed my quote CSS to this font – works fine.

    Perhaps I haven’t explained my question right – I just thought, if there’s perhaps a solution, adding the code for a new font in an easier way, for example in the functions.php (instead in the header.php like I have done now), because I use the plugin CodeSnippet and it would be easier to manage for me.

    Or alternatively, I thought, that there would be perhaps a workaround like you have mentioned here » – just in general, nothing to do with my own installation.

    #634202

    Hi,

    You could try turning on custom CSS for all builder elements: http://kriesi.at/documentation/enfold/turn-on-custom-css-field-for-all-alb-elements/. You can then assign a class using the font you would like to use to the element in question.

    Regards,
    Rikard

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.