• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
WPFeed

WPFeed

  • News
  • Tutorials
    • WordPress Multisite
    • BuddyPress
    • Design
  • Reviews
    • Plugins
  • Roundups
  • Snippets
  • Giveaways
Home » Roundups » Easily Create Your Site Functionality Plugin With Pluginception Plugin

Easily Create Your Site Functionality Plugin With Pluginception Plugin

Whenever you’re adding a new feature to your WordPress site or creating a new theme, one of the very important things to do is to decide whether the feature is a theme-specific or theme independent.

For example, if you’d like to create a new Custom Post Type called Portfolio, then the code to create the CPT shouldn’t belong to your theme. This is very important to make sure users won’t lost their Portfolio posts when they change their theme in the future. The best way to handle this it to create a site functionality plugin.

In this tutorial, I’ll show you to create your own site functionality plugin using a plugin called Pluginception.

Adding a new plugin (or feature) to your site is really easy. First, click on the Create a New plugin link.

pluginception

Then, give your plugin a name. The rest of the fields are just optional. Once you’re done, hit the “Create a blank plugin and activate it” button at the bottom of the page.

create-plugin

Next, simply put any code into the newly created plugin. Make sure you’re using the right PHP code.

sample-snippet

One of the awesome things about this plugin is whenever there’s an error in your code, the plugin will simply be deactivated. This is to make sure the code won’t break your site. That’s pretty cool as you can safely add a new code to a live site (although it’s not recommended)

Smart Tip

If you’re adding lots of new features to your site, instead of creating a new plugin for every feature, you could just create a plugin and put all the additional codes into this plugin. Make sure you give the plugin a meaningful name such as “Site Features” to prevent you accidentally delete or disable the plugin.

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Recent Posts

  • WordPress is a brilliant platform that is loaded with tons of stuff for websites.
  • How to Sync Stock & Price for WooCommerce Products
  • How to migrate a WooCommerce Store to a new site
  • How to Import WooCommerce Products
  • How to export WooCommerce Orders

Copyright © 2023 · WPFeed.com - A Project of TechAbout LLC.

  • About us
  • Advertise
  • Write for us
  • Terms and Conditions
  • Privacy Policy
  • Contact us