Impossible de change Fonts in child theme

Support Forums for LiveMesh Themes & Plugins Forums Extinct Theme Support Impossible de change Fonts in child theme

Tagged: 

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #19111
    Pulmolpulmol
    Member

    Hello,

    i modify the fonts for title in theme options and when i am on extinct child theme, it’s still the default fonts apply on frond end whereas the modif is done on back end.

    In extinct theme all is good the fonts are change when i change it on theme options.

    #19136
    RaghavendraRaghavendra
    Moderator

    This is a limitation with the child themes which can be overcome by enqueuing the child theme stylesheet as late as possible this way. The old method of importing parent stylesheet in child theme style.css is no longer recommended –

    https://codex.wordpress.org/Child_Themes

    Pls add the following code to your child theme functions.php file and check if that helps –

    
    function theme_enqueue_styles() {
    
        $parent_style = 'style-theme';
    
        wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
        wp_enqueue_style( 'child-style',
            get_stylesheet_directory_uri() . '/style.css',
            array( 'style-custom')
        ); /* Load after custom.css */
    }
    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
    
    
    #19173
    Pulmolpulmol
    Member
    This reply has been marked as private.
    #19196
    VeenaVeena
    Moderator
    This reply has been marked as private.
    #19201
    Pulmolpulmol
    Member
    This reply has been marked as private.
    #19242
    VeenaVeena
    Moderator

    I have changed the below custom CSS in child theme style.css from –

    h1, h2, h3, h4, h5, h6,#before-content-area h1, #before-content-area h2, #sitemap-template h2, #archives-template h2, .archive h2, #portfolio-full-width .entry-title, #portfolio-template .entry-title, .post-snippets .hentry .entry-title, #retina-text h3, .widget-title {
    font-family: 'Weston' !important;}
    

    to

    h1, h2, h3, h4, h5, h6,#before-content-area h1, #before-content-area h2, #sitemap-template h2, #archives-template h2, .archive h2, #portfolio-full-width .entry-title, #portfolio-template .entry-title, .post-snippets .hentry .entry-title, #retina-text h3, .widget-title {
    font-family: 'Weston';}
    

    And now the font changes are reflecting . Pls check.

    #19246
    Pulmolpulmol
    Member

    resolved

    perfect

    thanks

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Impossible de change Fonts in child theme’ is closed to new replies.