I've been toiling, probably way too long, with a simple Child Theme for a version of Fukasawa.
I know that the @import method is deprecated. I also know that enqueuing it the preferred method. But...
I first tried The Codex, which seemed pretty darn simple to follow (although I've since read much that says "disregard codex"). I got as far as seeing that "Dashboard>>Appearance>>Themes" recognizes my child theme (fukasawa-child) for Preview/Activation.
But, when it comes to "Enqueuing", I fall short, and "no style at all" is a result. My site looks like a bare unordered list.
I think I'm overanalyzing, but I have more questions than I can find the answers to (which is why I think I'm overanalyzing):
/*
Theme Name: Fukasawa Child Theme
Theme URI: my_website_url/fukasawa-child/ /* Q1 - should this uri actually be 'my_website/wp-content/themes/fukasawa-child' - which is the true path of where it sits, or is there some unwritten rule that assumes 'wp-content/themes/' ??? */
Description: child theme for Fukasawa
Author: my name (veeps)
Author URI: my_uri.com /* /Q2 - can I do this, as the customizer?
Template: fukasawa //codex says to leave just like parent
Version: 1.05
*/
Q3 - Is the above (css opening information) referenced by my functions.php later?
NEXT:
function theme_enqueue_styles() {
$parent_style = 'parent-style'; // Q4 - should 'parent-style' be replaced by 'fukasawa', or is that part of some pre-defined wp_universal_variable?
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', //should I eliminate the "...directory..." part of the get method?
array( $parent_style )
);
}
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
if "get_template_directory_uri()" is referenced AND identical for both parent & child, and if I've been instructed (by codex) to leave them the same as original (i.e. file named style.css and 'fukasawa' as theme...probably to make life easier for newbies not unlike myself), then how does the php know where to look for parent vs. child?