Child theme enqeueing breaks plugin
-
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
*/
- The topic ‘Child theme enqeueing breaks plugin’ is closed to new replies.