Forum Replies Created
-
AuthorPosts
-
raphael.giaSupport Expired
Great, thank you Billy.
raphael.giaSupport ExpiredYou didn’t answer to the question but that’s ok. I’m working for a client who chose your theme, I’ve implemented the child theme manually for custom code and I’m used to do it. But to do things correctly, and the WordPress docs link you gave me mentions it too in “3. Enqueue stylesheet”, the content of functions.php in child theme depends on how the parent theme works.
The only thing I was asking here is the minimal content of style.css and functions.php in child theme when you implement it manually with Freshio.raphael.giaSupport ExpiredHello Billy,
Should I let the the child theme functions.php file blank ? Does Freshio parent theme files load both parent’s and child’s stylesheets ? I don’t need to add PHP functions at the moment but just to be sure that stylesheets load correctly if I activate a child theme for custom CSS.
I found theses lines of code in the class-main.php :
/**
* Enqueue child theme stylesheet.
* A separate function is required as the child theme css needs to be enqueued _after_ the parent theme
* primary css and the separate WooCommerce css.
*
* @since 1.5.3
*/
public function child_scripts() {
if (is_child_theme()) {
$child_theme = wp_get_theme(get_stylesheet());
wp_enqueue_style(‘freshio-child-style’, get_stylesheet_uri(), array(), $child_theme->get(‘Version’));
}
}raphael.giaSupport ExpiredOk thank you again.
raphael.giaSupport ExpiredThanks for the answer. Yes I’ve already used child themes several times, if I follow along the WordPress developer docs it should be ok with Freshio ? No special aspect to take into consideration ? I prefer to ask because sometimes the usual way to intsall child theme won’t work with some themes.
Thanks.
Raphael -
AuthorPosts