If you include a plugin directly inside a theme then it will be rejected by both the WordPress.org theme directory and ThemeForest.
You should use TGMPA for including plugins with themes: http://tgmpluginactivation.com/
Further reading: http://code.tutsplus.com/tutorials/using-the-tgm-plugin-activation-library-in-your-themes–cms-20901
Using TGMPA means the plugin remains a plugin, WordPress loads it in the normal ‘plugin’ way, and users will get plugin updates as they’re released.
Related Posts:
- How to call “page specific menu items” in template [closed]
- How do I make my wordpress page more friendly for mobile viewers?
- Check javascript file Proper way in functions.php
- Should I use RIPS tool to test my themes and plugins?
- Workflow and best practice for documentation [closed]
- Is there a quick way to inject i18n domain into theme/plugin files?
- Translating plugin inside the theme [closed]
- Why are some of my thumbnails not being generated?
- Making menu link open in new tab?
- wordpress theme backend admin only
- Menus, but not by theme location
- How to get current post user id
- Different UI in WordPress
- The problem with WordPress Importer
- Classified ad website : which solutions to use? [closed]
- Finding the URL to be used to check if plugin is installed with a theme
- How can I position ShareThis buttons manually when using the plug-in? [closed]
- How to use get_template part in the plugin?
- Redirect to another page using contact form 7? [closed]
- How do I combine a theme with a plugin
- How to write “alt” tag in image for wordpress code?
- How to get menu location in wp_update_nav_menu hook
- Use different single.php file based on condition
- Include Minit plugin in theme [closed]
- How can I use my custom wordpress theme on two websites? [closed]
- why need theme,if page builder is there in wordpress [closed]
- Inserting Plugins Into Blank Space of Externally Designed WordPress Theme
- Don’t load the theme for a page FROM a plugin EDITED
- Extending a theme: build new features as plugin or core modules?
- how to design change in woocommerce cart page and all other page also by theme? [closed]
- display unique post per category
- How do you create a re-useable HTML fragment in wordpress
- navigation among single posts
- Identify current wordpress theme
- Removing the custom_image_header from wp_head
- Elementor Sidebar not loading when PRO elements plugin is active
- How to override any plugin file in the child theme
- Mobile Menu and Mobile Sidebar missing
- How to get a post views count using ‘WordPress popular posts’ plugin
- WordPress site hamburger menu toggle not working
- when i activate my WordPress plugin cannot see customizer options or preview
- Showing different js file for different theme in wordpress customizer api
- WordPress panel is not loading after plugin activated with error: HTTP ERROR 500
- When the user entered an unauthorized url redirect to login page
- how to add custom css at top above all css file for specific url
- How can I add a custom checkbox / radio button on the admin theme options to display a CSS or other?
- Why the output of an image gallery plugin is not displayed into a page of my custom theme?
- Disqus plugin outputs script as literal text
- Breadcrumb is not generating the correct post page url
- How can I add different menus (different style menu) on each page?
- Site is setup statically – how to make it content managable?
- How to work email subscribe in WordPress?
- Javascript as Jquery Function Call?
- Editing a theme
- How to escape html code?
- How to create an Info Box on WordPress [closed]
- How to make content as required in custom post type?
- Prevent primary navigational menu from expanding during page load (WordPress / Astra Theme)
- How to create new title and its description inside a section in WP Customizer?
- How to check if a theme is active?
- How to make plugin required in a wp theme without using php conditional statements when calling an individual function from that plugin?
- how to get path to images in the uploads folder to be used in a plugin
- How can I have two different urls for the same page that load two different templates?
- How to enable edit button in the theme’s customize UI?
- Ship plugin with a custom theme
- Show a WP 3.0 Custom Menu in an HTML Select with Auto-Navigation?
- How to solve a conflict between a plugin and a theme?
- WP Config for FTP credentials
- How to hide fields from my user profiles
- WordPress error – PHP Fatal error: Uncaught Error: Call to undefined function register_block_type_from_metadata()
- How to make my plugin theme-independent?
- Add custom buttons with custom actions in Edit Post screen in WordPress?
- Can I share predefined fonts from theme_support with a gutenberg component?
- How can I measure the performance of any WordPress Plugin or Theme?
- WordPress 5 upgrade: until when is it safe to keep project running in 4.x?
- Installing WordPress only for a separate page – ‘mydomain.com/blog’
- ‘Customize’ button in admin bar for CSS
- Set the active Navigation Menu from a plugin
- My Admin bar covers my sticky navbar [closed]
- Uncode theme content block header ignoring saved changes/not updating?
- Theme and plugin install or update display error in localhost
- Reduce Drop down Menu Width in WordPress
- How to Display a Plugin function (content) on frontpage using index.php
- How to make a slideshow shortcode based on the WordPress gallery shortcode? [closed]
- All of my custom posttypes are 404’ing
- Create custom registration form for WordPress Multisite
- posts comments goes to trash
- Advanced Custom Field DatePicker [closed]
- What will happen if i deactivate my visual composer plug in? [closed]
- Js file is not adding using this code in functions.php
- WordPress 3.8.3. custom theme – sliders won’t load js/css files
- Great blogs site resources/tutorial for WordPress Developers? [closed]
- how remove font to increase site speed load
- What is the purpose of WP_CONTENT_URL?
- WordPress API functions not working at AJAX functions.php call
- How to check homepage contain blog post?
- Getting unknown text in footer of email
- How to get current template file used by WordPress?
- Terms id wordpress error
- What is phpBB? Is it something like a plugin which I can use in WordPress? [closed]