How Sharma just mentioned, both approaches are working well, but depending on the site type and scope and also it depends on the feature that needs to be implemented in your WordPress.
If in the future you will change the theme of your WordPress site and you just implemented a feature in your current theme, it will be lost.
How the sketch below shows, I suggest to add your design in theme or child theme (recommended) and all functionalities in a plugin
I always add shortcodes, widgets, custom post types and metaboxes in plugin because the theme will not be same forever but this way the functionalities from the plugin will be kept.
Hope this answer your question;
Related Posts:
- Disable plugin / plugin action via theme
- Where can I sell WordPress themes and plugins? [closed]
- What are the package and subpackage comment for?
- Experiences with adding Nonces to the comment form
- How to add plugins to wordpress theme?
- Need to create a Theme demo site that features multiple themes
- Get URL of a specific file
- How do I make my wordpress page more friendly for mobile viewers?
- disable active plugins for specific theme
- Check javascript file Proper way in functions.php
- Should I use RIPS tool to test my themes and plugins?
- Make the css of the widget overwrite theme css
- A way to sort WordPress themes? [closed]
- adding a text message beside the comment submit button
- Recommendations for books/resource to get started with wordpress 3 development (plugins/themes) [closed]
- Uncaught Error: Call to undefined function get_user_by() after moving function from theme to plugin
- Why are some of my thumbnails not being generated?
- How to Implement “Notice: This theme recommands the following plugin:xyz” in wordpress? [closed]
- Making menu link open in new tab?
- Change settings of get_post_type_object
- Sage WordPress – Plugin Namespace: Not Found
- More than one text-domain is being used because of the included templates for plugins
- How To Clean The Malware Infected & Hacked WordPress Websites? [duplicate]
- How to prevent users to download videos from lms website?
- Different UI in WordPress
- plugin style conflicts, how to override? [closed]
- Hooking in to replace the Sidebar/Widget areas
- There is any way to remove post-format filter? [closed]
- Child Pages Short Code plug-in and hover capabilities?
- WordPress site periodically goes down
- Masonry images not working
- Why namespaces are rarely used in WordPress plugins?
- (Big issue) Blog is Getting Down Each day.. what should i do.?
- How to require users to login when not logged in
- Error when using plugin QuickCache with plugin Mobile Smart ? [closed]
- How do I find out what is in control over a certain part of a website?
- How do I combine a theme with a plugin
- Where are theme codes located for WordPress?
- Overwrite category head title
- Create a single website with 3 theme options in wordpress
- using do_shortcode
- How to load different homepage on Mobile.?
- How to get menu location in wp_update_nav_menu hook
- Use different single.php file based on condition
- Which wordpress theme is compatible Optima Express theme (real estate inventory) plugin?
- How to Include File from Plugins into Template?
- How to execute plugin and theme updates from a web hook / endpoint?
- How to translate WP Blog (search, category etc.)?
- issue in wp_localize_script
- How do I set up XAMPP to allow me to download plugins and themes?
- How to remove products-links after the product title using remove_action
- Licensing options for WordPress Plugins
- How I update WordPress theme and plugins
- Overwrite add_image_size defined by theme
- Don’t load the theme for a page FROM a plugin EDITED
- Extending a theme: build new features as plugin or core modules?
- Detect plugin/theme installation (via upload)
- is there a way to pass a parameter to a add_menu_page function?
- Is there a Image Gallery which will load all my posted Images like twitter’s image grid?
- What is the most efficient way of adding additional functionaliy for admin only
- How do I work with the SlideDeck plug-in?
- Plugin Admin panel checkbox unchecked after submit
- “User need to be logged in in order to make a booking” issue
- Custom Plugin scripts from admin working in frontend
- admin-ajax.php 500 error when new users try to register
- Scrape key check failed. Please try again
- Elementor Sidebar not loading when PRO elements plugin is active
- Disable WordPress Theme Browser and Plugin Browser
- Sold out Label for variable products which are partially sold out
- Create automatic latest version link
- How to Access a file that is inside a plugin’s dir from the theme’s `functions.php` file
- how to display a template.php in a shortcode
- dokan edit functionality
- how to split and upload a theme on wordpress?
- Removing Plugin Action via Theme for Non-admins
- Fatal error: Class ‘RDTheme’ not found
- How to fix blog article view and share #’s?
- When the user entered an unauthorized url redirect to login page
- how to add navigation icons in specific template?
- I want add repository theme folder
- How to make a website with two types of logins , Sellers and buyers?
- Shows warning when enable “wp_gallery_custom_links” plugin with Themify Builder
- Why all my wordpress sites keeps telling me that everything is up to date at /wp-admin/update-core.php?
- How can I save cookies to members
- How to add separator between default and custom panels in WordPress customizer?
- Speed issues because of CSS & JavaScript
- Ajax specific template not loading in replacement of index.php
- Woocommerce: deleted single-product.php, everything still works. How is it possible?
- pluggable function in theme, to be overridden by plugin
- How to tell if a script is being executed from a plugin, a theme or a child theme in WordPress?
- Need Help Creating a Multi-Step, Video-Guided Enrollment Site
- How can I modify the colors of my theme for a single section of my site? [closed]
- How to work email subscribe in WordPress?
- how to change location of the plugins & wordpress themes folder
- How to add a plugin in WordPress theme directory?
- Extra Text in Home URL
- WP Customer Reviews call short code on another page [closed]
- Editing a theme
- Self-hosted Plugins & Themes store with auto-updates? [closed]
- Very slow page loads