HomePage › Forums › Themes Support › Freshio – Organic & Food Store WordPress Theme › child theme
Tagged: child theme
- This topic has 9 replies, 2 voices, and was last updated 3 years, 5 months ago by raphael.gia.
-
AuthorPosts
-
November 15, 2020 at 12:54 am #1541raphael.giaSupport Expired
Hi there,
Could you detail the step to correctly install a Freshio child theme ? I know it can differ from one theme to another, could you specify the organisation of the files of the child theme folder, and the contents of style.css and functions.php in it ?
Thank you.November 16, 2020 at 10:46 am #1565Hi there,
Please try to read the document at: https://www.wpbeginner.com/beginners-guide/wordpress-child-theme-pros-cons/
and : https://developer.wordpress.org/themes/advanced-topics/child-themes/
#1: All css custom for theme you can add into file style.css
All function code php for theme, you can add into file function.phpWhen you use child theme and add code into it, if you update parent theme, your custom code wouldn’t lose.
November 16, 2020 at 5:20 pm #1589raphael.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.
RaphaelNovember 16, 2020 at 5:24 pm #1591Hi again,
Yes, our theme ready support child-theme. You can use child-theme to custom css and function code.
November 16, 2020 at 8:02 pm #1599raphael.giaSupport ExpiredOk thank you again.
November 17, 2020 at 10:05 pm #1639raphael.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’));
}
}November 18, 2020 at 8:36 am #1645Again, our theme ready support child-theme, you can add custom css in file style.css ( child-theme).
If you need to help, please let me know.Thanks
November 18, 2020 at 6:23 pm #1673raphael.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.November 19, 2020 at 9:46 am #1689Oh, sorry.
Please dowload child-theme at here: Child-theme Freshio
November 19, 2020 at 3:39 pm #1694raphael.giaSupport ExpiredGreat, thank you Billy.
-
AuthorPosts
You must be logged in to reply to this topic.