From performance point of view, I don’t think there is any difference between functions.php and plugins : it’s just different places for the code to be.
I would be practical : if the function is part of the theme’s core (say, a scrollable slider in the header without which the theme is worthless) : it’s a function of the theme.
If it is a generic function that could be useful to another theme (say, custom data field), it’s a better choice to make it a plugin, because you could easily copy/paste this function if the files are separated from the theme.
Related Posts:
- Autogenerate wordpress shortcodes using array?
- Shortcode display outside the div
- Shortcode under a Shortcode Multiple times Possible?
- Trying to count the total number of paragraphs inside a blog article
- May i Use ShortCode in Template?
- Prevent shortcode from being wrapped in tags
- Adding Shortcode to Text Widget
- creating html reusable blocks via shortcodes
- Nested shortcode functions accessing variable
- Calling an attribute from a plugin shortcode
- Redirect to another page using contact form 7? [closed]
- What is @Action in WordPress?
- Return multiple values in a shortcode attribute
- Shortcode Attributes to Return different $_POST
- strange shortcode error: does shortcodes requires any dependency?
- Add the_post_thumbnail_url to a shortcode in function.php
- Adding a Tag Parameter / Filter to My Shortcode
- grab or load text on demand
- Elementor Pro display featured image on section -> style -> image using shortcode
- How to get current cart values using WC_Shortcodes?
- Get Shortcode output to database for static post_content
- Find all strings between an enclosing shortcode
- wordpress Shortocode running twice?
- Posting code inside the post instead of in the template file using shortcode
- Integrate Razorpay quick payments plugin with contact form7 plugin
- Shortcode cannot parse attributes within double quotes. ” is becoming ” breaking my shortcode
- How can I call a function from one plugin within another plugin?
- Gutenberg disallow certain custom blocks but keep all core blocks?
- Publish author posts only with editor approval?
- Customizing subject in comment notification e-mails
- All shortcodes not working on custom theme
- WP showing “warning: call_user_func_array()”, What to do?
- Declare a function before plugin does on the theme functions.php file
- How to parse nested shortcodes?
- Generate Advanced Custom Fields box in custom admin menu page
- Removing user contact methods works from functions.php but not from a plugin
- change plugin shortcode function [closed]
- Dynamic HTML not displaying at respective place
- Use functionality of 2 wordpress plugins
- How can i change an image’s author?
- Short code for Venues
- Set WordPress Featured Image For All Post Slugs Matching Image File Name in Specified Directory
- Showing Co-Authors on post page
- jQuery Plugin to use WordPress functions in AJAX request
- Shortcode doesn’t work if I directly paste its function in a template file?
- WP Job Manager Category Drop-down; Change Placeholder Text Via Filter
- Redeclare theme’s function in a plugin
- I have functions in my wordpress plugin. How do I get them to work for me?
- How to generate CSS from a shortcode within a plugin
- How to remove html code in excel downloads using phpspreadsheet with wordpress plugins shortcode
- Change wordpress current_time function to different timezone
- How to override a plugin function wrapped in a class?
- Edit Yoast SEO breadcrumbs output [closed]
- How to put JQuery/Ajax inside shortcode?
- Calling plugin function inside custom plugin for onclick event
- How to fix wrong attribute error for Visual Composer Grid Builder?
- Show function to super admin
- Shortcode Plugin to dynamically build a shortcode via `do_shortcode` not working
- All sites themes functions.php have been changed
- Grab WordPress Salt Data From URL
- Inject HTML meta tag inside wordpress tag using add_shortcode
- My plugin won’t return anything [closed]
- Plugin is a widget, but I want to call it in the head, can I?
- Cannot get wpdb data (Error in a simple fuction) [closed]
- Shortcode to update user meta
- Deactivate JS Script in Plugin Shortcode
- Help with WP Business Directory Manager Plugin?
- Plugin that provides the [edit] shortcode?
- get specific value of a array | PHP
- How to change shortcode’s default theme?
- Loading a plugin’s js file from functions.php
- Is there a way to convert shortcodes to html content?
- How to access OOP plugin function inside themes or other plugin
- Different registration form for different roles
- Create a pdf from the entries in DB
- RSS feeds for specific topics
- add_rewrite_rule to load different page, without changing URL in browser
- Overriding a function in a WordPress plugin
- Adding discount functionality to the cart
- Issue Saving Posts That Contain Shortcode
- Use buddypress function outside of plugin
- Using Shortcode Result In Custom HTML Block (Using Google Sheet JQuery Result As NumScroller data-max)
- WPML – Hook when language is switched (change user language)
- Use action, filter, or hook to append HTML to WordPress plugin function
- Save Post Permalink In .txt File
- How To Add Code To WP Without Plugin or Functions
- Disqus comments count taking long to update
- plugin not hooking to my custom hook
- Populate select option with JSON file
- Multiple level shortcodes
- Is it right way to create shortcode?
- Trying to override/intercept a PhotoMosaic gallery link in WordPress using jQuery
- Trying to output a “Most visited blogs” list in wordpress multisite
- Creating Features List in WordPress Post
- wordpress Search function is not working
- I am experiencing difficulty fulfilling client request
- PHP Creating a formula from mysql db values and db stored math operator
- How to disable plugin capability : “create new category”
- Option value not getting updated until page refresh in WordPress
- WordPress Custom Page Blog Template Pagination Problem (Pagination Not Displaying)