• Resolved campanula

    (@campanula)


    I’m hoping to use your theme, but just with a different font (also a google webfont) – it’s for a school, so accessibility is important, but we wanted a more straight forward font for children.

    I’ve made a child theme to do this, but this doesn’t seem to work properly…

    First I had an error message, caused by this:

    // for demo purposes, I want this overridden by the inaccessible child; but will change after.
    require_once( get_stylesheet_directory() . '/inc/a11y.php' );
    require_once( get_template_directory() . '/inc/customizer.php' );

    Sorted that by copying the inc/a11y.php into the child theme folder.

    But cannot work out how to override the ‘Raleway’ font, as this doesn’t seem to be a pluggable function. Please can you let me know how this should be done with this theme?

    Many thanks in advance for your help!

Viewing 1 replies (of 1 total)
  • Thread Starter campanula

    (@campanula)

    Have now managed to override this using the following:

    function enqueue_child_theme_styles() {
        wp_register_style('ABeeZee', 'http://fonts.googleapis.com/css?family=ABeeZee:400');
        wp_register_style('universal-style', get_template_directory_uri().'/style.css' );
        wp_enqueue_style( 'child-style', get_stylesheet_uri(), array('universal-style', 'dashicons', 'ABeeZee' )  );
    }
    
    add_action( 'wp_enqueue_scripts', 'enqueue_child_theme_styles', PHP_INT_MAX);
Viewing 1 replies (of 1 total)

The topic ‘child theme function for font override’ is closed to new replies.