• Hey

    Want to override pluggable function.

    Declaring from theme/functions.php doesn’t work because it loads after pluggables.

    so I will make a function that includes a file with the override pluggable function, and hook it sometime before Pluggables is loaded.

    Problem is I haven’t been able to find an action that works for my purpose.

    -Which one to use?

    -Also, where to declare the add_action and the includer function?

    Any help appreciated.

    • This topic was modified 1 year, 7 months ago by antonicofr.
Viewing 1 replies (of 1 total)
  • “Pluggable” functions are meant to be overridden from plugins, not themes. That’s why your theme can’t override them.

    The easy way to do this is to create a basic plugin, which can be just a single file, and add your functions in there. The added benefit to this is that you can keep that the same of you ever want to change themes in the future.

Viewing 1 replies (of 1 total)
  • The topic ‘Override Pluggable function from my theme functions.php’ is closed to new replies.