i created a child-theme for the theme customify, and wordpress is recognising the theme and loading it.
There were some changes though that were not getting through, and i was paying attention to the css selectors to see if something was being missed, then i found a topic with someone suggesting to check the loading order, and correctly enough, the minified stylesheet of the parent, loads after the child theme stylesheet.
If i cheat a bit the code, enqueuing the parent's minified style instead of the general one, and removing/matching the version number of the child's style, the minified css loads before, but still the css changes don't override.
if i don't change the child's version number, a minified version of the parent, matching the version number of the child's appears loading after.
below is all the code and screenshots of what i'm trying to explain.
functions.php of child-theme:
function my_theme_enqueue_styles() {
$parent_style = 'parent-style';
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.min.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' );
style.css of child-theme:
/*!
Theme Name: Customify Child
Theme URI: https://wpcustomify.com
Author: JNK XI
Author URI: https://
Description: Customify Child Theme
Template: customify
Version: 0.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: customify-child
Domain Path: /languages
Tags: custom-background, custom-logo, custom-menu, custom-logo, featured-images, flexible-header, footer-widgets, full-width-template, sticky-post, theme-options, threaded-comments, translation-ready, one-column, two-columns, three-columns, left-sidebar, right-sidebar, e-commerce, blog
*/
Console Printscreen if version of child-theme stylesheet is different from parent's
Console Printscreen if version of child-theme stylesheet matches parent's
Please tell me if something is unclear.
any help would be appreciated, thank you
.page .widget h2
instead of.widget h2
.