• Resolved somedev

    (@somedev)


    When creating a child theme and enqueing the child theme, the Google Fonts plugin is rendered null (the fonts revert to most common web font that was there before installing Google fonts).

    In The child themes functions.php file is this:
    _____________________________________________
    <?php
    function my_theme_enqueue_styles() {

    $parent_style = ‘magazine-7-style’; //

    wp_enqueue_style( $parent_style, get_template_directory_uri() . ‘/style.css’ );
    wp_enqueue_style( ‘child-style’,
    get_stylesheet_directory_uri() . ‘/style.css’,
    array( $parent_style ),
    wp_get_theme()->get(‘Version’)
    );
    }
    add_action( ‘wp_enqueue_scripts’, ‘my_theme_enqueue_styles’ );
    ?>

    _____________________________________________

    In the child theme’s style.css file is this:

    /*
    Theme Name: Magazine 7 Child
    Theme URI: https://afthemes.com/products/magazine-7/
    Author: AF themes
    Author URI: https://www.afthemes.com/
    Description: Magazine 7 Child Theme
    Template: magazine-7
    Version: 2
    License: GNU General Public License v2 or later
    License URI: https://www.gnu.org/licenses/gpl-2.0.html
    Tags:
    Text Domain: magazine-7-child
    */

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter somedev

    (@somedev)

    SOLUTION: The settings (in Customize) for this plugin have to be completely redone for the child theme. Lame.

    Plugin Author DannyCooper

    (@dannycooper)

    Hi @somedev,

    Sorry about that. As child themes can be very different than the parent theme, we don’t want to automatically override the child themes font declarations.

    Let me know if I can help with anything else.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Child theme enqeueing breaks plugin’ is closed to new replies.