Home Forums Event Espresso Premium Display Event cart ICON only when not empty Reply To: Display Event cart ICON only when not empty

Reply To: Display Event cart ICON only when not empty

Author Replies
Tony # Posted on May 8, 2018 at 8:43 am

Ok, let’s say you’re using a distributed theme, it could be any, say twentyseventeen or a theme from the dreaded Theme Forest.

You now add all your custom functions to functions.php and get the site all customized to work how you want, great!

2 weeks later the theme author releases ver 1.2 of your theme with a new kitchen sink feature and you update the theme.

What actually happens is WordPress deletes the current version of the theme (yes including your functions.php file) and extracts the new version in its place. So even if the theme has a single change in a completely unrelated file to where you have edited the whole theme is replaced (same with plugins)… you’ve now lost all those customizations and that’s no fun at all!

The way around that is to use a child theme or a custom functions plugin, if you create a child theme it overrides the parent’s files, so you can customize the child theme all you like (copying over files from the parent) and also update the ‘parent’ theme without causing problems.

A plugin is pretty much the same, so if you aren’t using a child theme already it’s easier to set up. Meaning we could ask a bunch of question on if you are using a child theme and if you don’t know, then how to find out but then you if didn’t know it’s unlikely you’ll know how to edit the child theme correctly etc…. or I can advise you to use a plugin which just works if you follow the documentation 🙂


So is using the themes functions.php file ok?

Sure it is, if you know about the above and manage the updates correctly, or your already using a custom theme specific to the site, or a distributed theme and you’ve created a child theme.

A custom functions plugin doesn’t care what theme you’re using, it’ll just work with whatever functions you place into it (unless hooking into theme specific functions but that’s outside the scope of this). Not only that but load order can come into play, functions placed in your theme’s functions.php file may ‘fire’ too late to be able to make some changes.

Do NOT follow this link or you will be banned from the site!