How to override an unpluggable parent theme function?

Since the function is used in your child theme’s template there’s nothing stopping you from using a function with a different name. So you don’t actually need to plug the function, you just need to create a function that does what you want and use that instead.

So copy ale_filter() to your child theme, rename it something like ale_child_filter(), change it however you like, and then just change your template to use that function.

You only need to plug a function if the function is used somewhere that you can’t overwrite with your child theme. Plugging it would allow you redefine a function when you don’t have access to change where the function is used. Since you do have the ability to change which function is used, plugging the function is unnecessary.

Leave a Comment