What is a plugin in WordPress? How is it different from a theme?

A plugin is a PHP file or folder which adds a feature to WordPress, like a contact form, SEO tools, backups or an online shop. It works with hooks, so the core files are not changed.

PointThemePlugin
JobDesign and layoutFeatures and functions
Changes when you switch itThe look of the siteThe feature turns off
Folderwp-content/themeswp-content/plugins
Active at a timeOnly one themeMany plugins

A good rule: if the code is about how the site looks, it belongs to the theme; if it is a feature which must work with any theme (like a custom post type), make a plugin.

See WordPress Plugins and Create a WordPress Plugin.


Learn more about the similar topics:
Tutorials
No Content Found.
Exercises & Assignments
No Content Found.
Interview Questions & Answers
No Content Found.