0

I'm using Magento 2.3.1 and Porto theme, that theme is a hassle to install. Just got it done.

This is a Porto child theme

Is it necessary to install it?

is there an easy way to install it without having to reinstall Porto? Because I forgot to install it before.

  • You can use whatever theme you want. If you want to use a child you need the parent. If you want to use the parent, you don't need the child. This seems pretty straight forward to me. A child can not exist without the parent, a parent can exist without a child. – vitoriodachef Jun 17 at 19:44
  • In wordpress, if you don't use a child theme, the moment you update the current theme, all the customization you did is gone, isn't it the same in magento? – Lynob Jun 17 at 19:47
  • I understand now. You want to extend the Porto theme. Yes, you need a child theme tp properly do so, otherwise you will lose changes when you upgrade the Porto theme. You need to create your own theme and set Porto as a parent. Except (you need to be extra sure here), except you don't plan on upgrading the Porto theme, then I suggest you version it (git) and you can make changes directly there. Now this will impact the way you deploy it, based on the deploy procedure (composer or otherwise). – vitoriodachef Jun 17 at 19:51
2

in any development you have two options:

1 - using child theme. full separate development to add or rewrite some functions.

2 - using template and css overrides. partial css changes within core theme.

child theme is the easiest way. if your development takes too long, during this time master theme can be upgraded many times to fix security and design bugs, you can safely overwrite any file in master theme.

you will keep any changes in child theme.

option 2 is only for little changes, like custom css file to move some design.

1

Child themes go alongside a base theme.

If you are happy with the base theme then no need to install the child theme. However if the child theme contains something additional that you require then you need to install both the base theme and the child. And then from the admin apply the child theme as per dev docs

https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/themes/theme-apply.html

The child theme will include all it's own customisations plus inherit all the base theme functionality.

If you need to make your own modifications I would recommend creating your own child theme and making changes within this.

But again this is optional. You may find you only need to make minor changes to the base theme.

Whatever workflow works for you. Plus if you are using version control theme inhertience is less important as you can easily rollback your changes.

  • In wordpress, if you don't use a child theme, the moment you update the current theme, all the customization you did is gone, isn't it the same in magento? – Lynob Jun 17 at 19:47
  • Potentially. It's been a while since I've used Wordpress although I figure it's much harder to accidentally update your theme. Do themes in WP autoupdate? In Magento you would have to basically reinstall from source to lose your changes. – Dominic Xigen Jun 17 at 23:30
  • Yes, some premium themes auto update in WP elegantthemes.com/gallery/divi I believe you could configure that to auto update. In addition some hosting that specializes in wordpress such as siteground.com offer the option to auto update everything for you every once in a while. – Lynob Jun 17 at 23:57
  • But the thing is, say tomorrow they discovered a security problem in magento, and forced every one to update, the theme I'm using might become broken and I'll be forced to update and then I'll lose my changes. A day will come where I'm forced to update magento for whatever reason. The porto theme has a version and a patch for every little magento update, so I believe that the theme will be broken soon. So I had to ask the question. – Lynob Jun 18 at 0:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.