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 can I keep a WordPress dropdown menu open when navigating to a child page?
- Events Made Easy Plugin – Duplicate Title Tags
- Only Homepage not loading properly
- My Admin bar covers my sticky navbar [closed]
- Uncode theme content block header ignoring saved changes/not updating?
- Two (or more) looks, with one set of content
- Using custom JS plugins with WordPress?
- Theme and plugin install or update display error in localhost
- What is the correct way to update both WP/plugins/themes without breaking the site?
- Re-naming a theme/child theme whilst maintaining updates
- Can I make a super plugin that also has a theme?
- Redux Framework has an embedded demo. Click here to activate the sample config file
- Reduce Drop down Menu Width in WordPress
- Not getting author rank when using return
- plugin style conflicts, how to override? [closed]
- How to Display a Plugin function (content) on frontpage using index.php
- Unable to upload wordpress plugins
- How to disable CSS rule in Twentythirteen style.css?
- How to make theme elements customizable in wordpress?
- Why does my functions.php cause white-screen and media-library issues?
- Prevent WordPress installing plugins and themes via Admin
- How to make a slideshow shortcode based on the WordPress gallery shortcode? [closed]
- how to give a user a role?
- Plugin Handle URL With Custom Theme
- Globally register styles but enqueue them selectively
- How to read individual user’s directory and display content to that specific user?
- Creating a nav menu
- Guidelines / restrictions about advertising /donate begging unside wordpress plugins or themes
- All of my custom posttypes are 404’ing
- Admin Theme customization
- Hooking in to replace the Sidebar/Widget areas
- WSOD after upgrading to 3.1
- Display post lists in 2nd paragraph
- Easiest way to add dropdown to a page
- How to get the element ID from new menu list that added with add_filter()?
- Check for security updates
- wp_get_post_terms is difference obj model than the one in rest api response
- how to add a button next to the wordpress view button?
- (FES EDD) New vendor submission page is blank
- There is any way to remove post-format filter? [closed]
- Plugin-generated pages use Not Found or Pages Archive templates?