HomePage › Forums › Themes Support › Freshio – Organic & Food Store WordPress Theme › Child Theme
- This topic has 9 replies, 2 voices, and was last updated 1 year, 5 months ago by Billy Nguyen.
-
AuthorPosts
-
November 2, 2022 at 9:34 pm #28904montebelluardoSupport Expired
I need to update your theme with custom theme tag, how does fresh child it work?
For example if i need to update the page template-parts\breadcrumb.php how can do it?November 3, 2022 at 10:36 am #28933Hi,
You need to update your main-theme to the latest version.
Also if you want to customize the functions or layout related to the theme, you will have to add them to the child-theme to ensure that when you update the main-theme these customizations are not lost.
As an example, you need to copy the file template-parts\breadcrumb.php into the child-theme -> then edit this file in the child-theme if you want.November 3, 2022 at 11:03 pm #28951montebelluardoSupport Expiredis it required to update the main theme to use this procedure list below?
“.. you need to copy the file template-parts\breadcrumb.php into the child-theme -> then edit this file in the child-theme if you want.”
I’ve already add this file template-parts\breadcrumb.php in the theme child but it doesn’t work
November 4, 2022 at 9:08 am #28964Hello,
Please send the admin web account for me, I will check and try to help you.
November 9, 2022 at 8:17 pm #29116montebelluardoSupport ExpiredThis reply has been marked as private.November 10, 2022 at 10:05 am #29134Hi,
I don’t see you adding template-parts\breadcrumb.php file to your child-theme, please check again: https://prnt.sc/79Gq07x7ESzJ
I can’t add this file for you because I don’t have a hosting accountNovember 10, 2022 at 4:41 pm #29146montebelluardoSupport ExpiredThanks, now it’s work fine.
Is it possibile to inherit this file wp-content/plugins/woocommerce/includes/wc-template-functions.php into freshio-child theme and customize this code file?
November 11, 2022 at 9:10 am #29155Hi,
No, you won’t be able to overwrite this whole file from plugin to child-theme.
Depending on whether the functions allow overriding or not, you can copy this function to the child-theme and customize the code.Functions that contain code like
if ( ! function_exists( 'function name' ) ) {
allows you to override the child-theme: https://prnt.sc/MwPRw28rL6aZNovember 21, 2022 at 8:35 am #29467montebelluardoSupport Expiredok, thanks it’ work fine.
i’ve another question: how can customize this file inc/elementor/widgets/product-categories.php? I copied this file in Freshio-Child theme but it doesn’t has effect
Freshio: https://prnt.sc/d8KCqKGrFv1i
Freshio-Child: https://prnt.sc/AZgubECc5jYyThanks
November 21, 2022 at 9:25 am #29485Hi,
To override Elementor widgets in child-theme you have to do it differently.
1. Create elementor widget file and declare in functions.php( child-theme) file:function freshio_register_oembed_widget( $widgets_manager ) { require_once( get_stylesheet_directory_uri() . '/product-categories.php' ); $widgets_manager->register( new \Elementor _Products_Categories() ); } add_action( 'elementor/widgets/register', 'freshio_register_oembed_widget' );
2. Copy all the code in the product-categories.php file into the newly created file in the child-theme.
3. Rename class Freshio_Elementor _Products_Categories to another name: ‘Elementor _Products_Categories’ -
AuthorPosts
You must be logged in to reply to this topic.