Ultimately it’s about maintainability and readability. Functions.php is good for adding just that – functions. Small snippets of code that modify or add to the theme. When you start getting into classes or building some kind of framework, you need to start separating your concerns whether that be moving them into a plugin or simply including your class files into the theme and keeping a well organized directory.
And there’s no performance to contend here – it’s all about what makes development the easiest and most maintainable for you.
Related Posts:
- Making update notification functionality for my themes
- Should `get_template_directory_uri()` be escaped?
- Best practice for including plugins as part of a theme?
- How to disable 3.1 “Admin Bar” via script for the admin user?
- Where do I find the functions triggered within a hook?
- How to determine the current widget’s parent container (sidebar widget id)
- Add meta-information to theme itself
- Theme elements not translating
- why does twenty eleven theme mix up the css measurement units?
- How to use bloginfo( ‘template_directory’ ) in array
- Is using eval() ok in this scenario
- Should I update my _s theme?
- Prevent WordPress updates from overriding custom language translations?
- Display site admin profile fields in header.php
- Page template across themes
- WordPress Genesis Child Theme Filter divs
- Displaying part of every child page?
- How do I obtain the post content via a custom meta box inside the editor?
- Displaying Remote Data inside of Theme admin
- WordPress 5.8 update problem custom theme styles are overridden by core styles common.min.css
- Append HTML to an LI of wp_list_categories
- Customizer API and add_panel(). Panel doesn’t show
- How to correctly add JQuery in a WP theme?
- how to change a theme slug
- Weekly background code not working
- I want to get the home root path
- How to add code in the content area in a WordPress theme?
- Can I show all the template files that are being used on my site?
- How can i add edit shortcut icon in wordpress customizer without using selective refresh?
- How to make Home Menu( Front Page) use index.php instead of page.php
- Unable to pass variable on theme cusomizer add_settings()
- JavaScript Change focus to password field login page being reset
- How to add Bootstrap Tour JavaScript to WordPress Admin Panel Dashboard Widget
- Broken template went invisible
- get_theme_mod returning no output
- Can I have a widget and sidebars in custom theme?
- Select full Image Size on widget “Genesis – Featured Posts”
- Where to find the code that redirects requests on the static page URL to the home page
- How to change database values on theme update
- after renaming my wp-content folder, how do I upgrade my wordpress version?
- Issue on Adding A Class to Bootstrap Navbar Walker Dropdown
- Make custom CSS changes and use built in theme customizer later?
- Post thumbnail to append post content via ajax click event
- Is it possible to save more than one image to an option?
- Theme’s window.open call goes to “Page Not Found”
- Inserting images in multiple posts native gallery
- Should i clear the plugin cache for cache busting?
- Wp Super Cache stops the update of a Post Meta
- Renaming a theme so it aids SEO and the theme used is hidden
- Dynamic menu links after header title
- Does the textdomain have to be the theme’s name?
- What should I use? index.php, front-page.php and home.php
- Theme thumbnail in dashboard
- Prerequisites Skills to learn WordPress [closed]
- What is the diferences between pure WordPress theme and Woocommerce theme? [closed]
- How to rotate every letter in a title
- Should I create multiple sidebars, or use or one dynamic sidebar with logic to determine it’s abilities?
- Insert Rich Text Editor in theme?
- WordPress Theme that returns all posts as a JSON object?
- Can I make a Customizer dropdown-pages list include private pages?
- HTML block gutenberg templates
- Use a filter on menu items that have children
- How to add custom meta box when you have a custom page template file
- Password protect a custom template
- Reusable and site-wide content that can be used in a theme
- Theme Check errors of theme code
- New to WordPress – Read the Codex, Other Docs; Still Confused
- Style first 3 posts differently with WP_Query [duplicate]
- is_front_page use in sidebar.php
- matisse theme show excerpts not whole content
- My custom taxonomies are not showing up in the admin menus
- Let user to upload multiple time
- get main URL from subdirectory with php
- How to add custom theme in hosting server?
- Is there a plugin for versioning files in the theme (style , .js and .php files)?
- Infinite loop when nesting have_posts()
- WordPress Custom Theme : Theme Builder vs ACF vs Gutenberg
- Getting unexpected warnings from theme options code
- Is_single not working properly in genesis
- Debugging slow WordPress Theme Customizer (Any option similar to Query Monitor)?
- After WP 4.6.1 Update , Blog page started giving 500 error
- How to show children pages as array
- wp_nav_menu custom walker class
- Changes to template not showing up unless ?reset=1 added to URL
- How do I keep images in posts below a certain size without editing the post?
- Theme options not displaying correctly after theme update
- Multiple Content Shortcodes
- Is it possible to customize the layout of Gallery Shortcode?
- How can i use archive.php for indexing wordpress default posts?
- Add the ability of changing background color of a theme [closed]
- How to use esc_attr__() function properly to translate a variable that contains string?
- What to do when child theme is out of date with parent theme
- Query for tag given slug
- Image Size wrong during upload
- How can I add a single image from a gallery into the page header?
- Bootstrap 4 mobile menu not working for WordPress Development
- Configuring static page with add_rewrite_rule gives 404 after navigating to Permalinks admin panel
- How do I send out an update for my custom wordpress theme?
- custom wordpress theme blog page always not showing the last two pages of the articles
- Cart button not working on mobile version [closed]