Okay
  Public Ticket #1564196
Complete CSS Classes to replace fonts with custom fonts
Closed

Comments

  •  6
    ctekk started the conversation

    Hi,

    Can you please provide me with all classes, ids and elements where I need to change font-family, so that I can have my custom font on the complete website?

    Like "h1,h2,h3,..."

  •  9,073
    Tahir replied

    Hey Again,

    Please have a look at this Article :Add a Custom Font.

    Best


    ThemeNectar Support Team 

  •  6
    ctekk replied

    Thanks for the quick reply!

    Salient tries to get my custom font from google even though I implemented it via @font-face.

    Thus there is always a 404 error when I load the site - how to prevent this?

    I implemented the custom font like this:

    function salient_redux_custom_fonts( $custom_fonts ) {
        return array(
            'Custom Fonts' => array(
                 '\'IBMPS\', sans-serif' => "IBM Plex Sans"
            )
        );
    }
    add_filter( "redux/salient_redux/field/typography/custom_fonts", "salient_redux_custom_fonts" );

    My custom font is named IBMPS, salient puts following script in head which results in 404:

    <link rel='stylesheet' id='redux-google-fonts-salient_redux-css' href='https://fonts.googleapis.com/css?family=%27IBMPS%27%2C+sans-serif%3A400%2C700&ver=1525464881' type='text/css' media='all'>
    

    The new EU privacy law (possibly) demands that I don't load the fonts via google API but from local server.

  •  9,073
    Tahir replied

    Hey Again,

    Could you allow us to log in to your website backend dashboard so we can check on this for you more?. We are gonna need the username and password of admin user as well as the login url.

    Best


    ThemeNectar Support Team 

  •   ctekk replied privately
  •  3,068
    Andrew replied

    Hey there,

    Thanks for reaching in,

    Have you tried to implement the other alternatives in the articles included and see if they work?

    Regards

  •  6
    ctekk replied

    Hi Andrew,

    there is no alternative to this php snippet?

    I mean I could just overwrite the font-family for all classes (& ids) instead of this php snippet but then I'd need all the classes & ids to overwrite.

    I could then set the salient font in theme options to something like Arial to prevent the call to the google servers.

    function salient_redux_custom_fonts( $custom_fonts ) {    return array(        'Custom Fonts' => array(             'futura-pt,sans-serif' => "Futura PT"        )    );
    }
    add_filter( "redux/salient_redux/field/typography/custom_fonts", "salient_redux_custom_fonts" );


  •  9,073
    Tahir replied

    Hey Again,

    See screenshot : http://prntscr.com/jfs3il . You can find the relevant css selectors in "salient/css/fonts.php" .

    Best


    ThemeNectar Support Team 

  •  6
    ctekk replied

    Awesome, thanks Tahir!