[Theme: Freak Pro] Child Theme Functions.php Issue
-
Hello!
I’m trying to create a child theme for my freak pro parent. I’ve already edited the main.css stylesheet for the changes I want made, but my issue is creating the functions.php file for my child theme. Main.css is located in assets/css/main.css, separate from the style.css stylesheet located in the root folder. I’ve ALMOST got the php working, but I’m lost when it comes to get_stylesheet_directory_uri, as suggested in various tutorials.
How do I get a stylesheet located in a folder within the root folder, or do I stick with “wp_enqueue_style( ‘child-style’, get_stylesheet_directory_uri(), array(‘parent-style’) );”?
Here’s what I have so far:
<?php function enqueue_theme_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); wp_enqueue_style( 'main-style', get_template_directory_uri() . '/assets/css/main.css' ); wp_enqueue_style( 'parent-style', get_stylesheet_directory_uri(), array( 'parent-style' ) ); } add_action( 'wp_enqueue_scripts', 'enqueue_child_theme_styles'); ?>
I’m new to php, but I THINK I’m getting pretty close to making it work! ANY help/corrections/suggestions will be appreciated! Thank you!
- The topic ‘[Theme: Freak Pro] Child Theme Functions.php Issue’ is closed to new replies.