What's the best way to organize functions.php for performance?

I have a couple of add_action calls, few more add_theme_support and couple of add_filter and 4 additional functions. For breadcrumbs, stylesheets, registering menu and widgets.

Is there an order we will need to follow? For example first all the add_filter functions, then the add theme_support etc.

Not sure if it's relevant to add the code since it's a general question. If needed, I would gladly update this post.

1 Answer 1


Doing this simply won't make a significant performance difference, instead organize your customizations with clear headings so you can find and edit things faster later... in other words, organize for development in this case, not for the frontend. There are plenty of other optimizations that can be done with some research but this just isn't one of them.

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.