New Landing How can we help? Atelier Atelier Child Theme CSS overrides not working

Viewing 5 posts - 1 through 5 (of 5 total)
  • Posted in: Atelier
  • #167050
    Joni
    Member
    Post count: 52

    Hello again,

    I activated the supplied Atelier child theme, but the Font overrides that worked before with Cardinal, don’t work for some reason.

    I use typography.com as a font supplier and previously I’ve managed to use their fonts by adding a line of code in the “head.php” file of the original theme.

    <link rel="stylesheet" type="text/css" href="//cloud.typography.com/6232452/647546/css/fonts.css" />

    Only thing with this is that I have to edit the head after each update, but other than that it has worked with no major problems.

    So my question is two fold… One, is there a reason that this modification doesn’t work in Atelier vs. Cardinal? And two if this works, is there a better way to inject the typography.com code so that I don’t always have to re-do the mod after updates?

    #167090
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please code like this in style.css of child theme:-

    @import url('//cloud.typography.com/6232452/647546/css/fonts.css');

    Thanks
    Mohammad

    #167236
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi @Joni

    You can either try Mohammad’s solution, or you can use this code to hook into the head, and have it stick with updates. All you need to do is enable the child theme, and add this to the functions.php file:

    function custom_font_enqueue() {
        wp_register_style('custom-font', '//cloud.typography.com/6232452/647546/css/fonts.css', array(), NULL, 'all');
    	wp_enqueue_style('custom-font');
    }
    add_action('wp_enqueue_scripts', 'custom_font_enqueue');

    I would advise this solution.

    – Ed

    #167437
    Joni
    Member
    Post count: 52

    Hi,

    The theme update seems to solve this issue. Thanks again!

    -Joni

    #167442
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Great, glad it’s sorted!

    – Ed

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.